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

#include <cpp-terminal/stream.hpp>

Public Member Functions

 TOstream (const Term::Buffer::Type &type=Term::Buffer::Type::LineBuffered, const std::streamsize &size=BUFSIZ)
 
 ~TOstream ()
 
 TOstream (const TOstream &)=delete
 
 TOstream (TOstream &&)=delete
 
TOstreamoperator= (TOstream &&)=delete
 
TOstreamoperator= (const TOstream &)=delete
 
template<typename T >
TOstreamoperator<< (const T &t)
 
TOstreamoperator<< (std::ostream &(*t)(std::ostream &))
 

Private Attributes

Term::Buffer m_buffer
 
std::ostream m_stream
 

Detailed Description

Definition at line 41 of file stream.hpp.

Constructor & Destructor Documentation

◆ TOstream() [1/3]

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

Definition at line 18 of file stream.cpp.

18: m_buffer(type, size), m_stream(&m_buffer) {}
Term::Buffer m_buffer
Definition stream.hpp:62
std::ostream m_stream
Definition stream.hpp:63

◆ ~TOstream()

Term::TOstream::~TOstream ( )

Definition at line 20 of file stream.cpp.

20{ m_stream.flush(); }

◆ TOstream() [2/3]

Term::TOstream::TOstream ( const TOstream & )
delete

◆ TOstream() [3/3]

Term::TOstream::TOstream ( TOstream && )
delete

Member Function Documentation

◆ operator<<() [1/2]

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

Definition at line 50 of file stream.hpp.

51 {
52 m_stream << t;
53 return *this;
54 }

◆ operator<<() [2/2]

TOstream & Term::TOstream::operator<< ( std::ostream &(* )(std::ostream &))
inline

Definition at line 55 of file stream.hpp.

56 {
57 m_stream << t;
58 return *this;
59 }

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

Member Data Documentation

◆ m_buffer

Term::Buffer Term::TOstream::m_buffer
private

Definition at line 62 of file stream.hpp.

◆ m_stream

std::ostream Term::TOstream::m_stream
private

Definition at line 63 of file stream.hpp.


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