cpp-terminal 1.0.0
Small C++ library for writing multiplatform terminal applications
Loading...
Searching...
No Matches
Term::TIstream Class Reference

#include <cpp-terminal/stream.hpp>

Public Member Functions

 TIstream (const Term::Buffer::Type &type=Term::Buffer::Type::LineBuffered, const std::streamsize &size=BUFSIZ)
 
 TIstream (const TIstream &)=delete
 
 TIstream (TIstream &&other)=delete
 
TIstreamoperator= (TIstream &&)=delete
 
TIstreamoperator= (const TIstream &)=delete
 
 ~TIstream ()
 
std::streambuf * rdbuf () const
 
template<typename T >
TIstreamoperator>> (T &t)
 

Private Attributes

Term::Buffer m_buffer
 
std::istream m_stream
 

Detailed Description

Definition at line 20 of file stream.hpp.

Constructor & Destructor Documentation

◆ TIstream() [1/3]

Term::TIstream::TIstream ( const Term::Buffer::Type & type = Term::Buffer::Type::LineBuffered,
const std::streamsize & size = BUFSIZ )
explicit

Definition at line 12 of file stream.cpp.

12: m_buffer(type, size), m_stream(&m_buffer) {}
Term::Buffer m_buffer
Definition stream.hpp:37
std::istream m_stream
Definition stream.hpp:38

◆ TIstream() [2/3]

Term::TIstream::TIstream ( const TIstream & )
delete

◆ TIstream() [3/3]

Term::TIstream::TIstream ( TIstream && other)
delete

◆ ~TIstream()

Term::TIstream::~TIstream ( )

Definition at line 14 of file stream.cpp.

14{ m_stream.clear(); }

Member Function Documentation

◆ operator=() [1/2]

TIstream & Term::TIstream::operator= ( const TIstream & )
delete

◆ operator=() [2/2]

TIstream & Term::TIstream::operator= ( TIstream && )
delete

◆ operator>>()

template<typename T >
TIstream & Term::TIstream::operator>> ( T & t)
inline

Definition at line 30 of file stream.hpp.

31 {
32 m_stream >> t;
33 return *this;
34 }

◆ rdbuf()

std::streambuf * Term::TIstream::rdbuf ( ) const

Definition at line 16 of file stream.cpp.

16{ return const_cast<Term::Buffer*>(&m_buffer); }

Member Data Documentation

◆ m_buffer

Term::Buffer Term::TIstream::m_buffer
private

Definition at line 37 of file stream.hpp.

◆ m_stream

std::istream Term::TIstream::m_stream
private

Definition at line 38 of file stream.hpp.


The documentation for this class was generated from the following files: