A wrapper for a TextOutputStream, optimised for writing a single character at a time. More...
#include <textstream.h>
Public Member Functions | |
SingleCharacterOutputStream (TextOutputStream &ostream) | |
~SingleCharacterOutputStream () | |
void | write (const char c) |
std::size_t | write (const char *buffer, std::size_t length) |
Private Types | |
enum | unnamed0 { m_bufsize = 1024 } |
Private Member Functions | |
const char * | end () const |
void | reset () |
void | flush () |
Private Attributes | |
TextOutputStream & | m_ostream |
char | m_buffer [m_bufsize] |
char * | m_pos |
const char * | m_end |
A wrapper for a TextOutputStream, optimised for writing a single character at a time.
Definition at line 324 of file textstream.h.
enum SingleCharacterOutputStream::unnamed0 [private] |
Definition at line 325 of file textstream.h.
SingleCharacterOutputStream::SingleCharacterOutputStream | ( | TextOutputStream & | ostream | ) | [inline] |
Definition at line 342 of file textstream.h.
SingleCharacterOutputStream::~SingleCharacterOutputStream | ( | ) | [inline] |
Definition at line 344 of file textstream.h.
References flush().
const char* SingleCharacterOutputStream::end | ( | ) | const [inline, private] |
void SingleCharacterOutputStream::flush | ( | ) | [inline, private] |
Definition at line 337 of file textstream.h.
References m_buffer, m_ostream, m_pos, and reset().
Referenced by write(), and ~SingleCharacterOutputStream().
void SingleCharacterOutputStream::reset | ( | ) | [inline, private] |
std::size_t SingleCharacterOutputStream::write | ( | const char * | buffer, | |
std::size_t | length | |||
) | [inline] |
Definition at line 353 of file textstream.h.
void SingleCharacterOutputStream::write | ( | const char | c | ) | [inline] |
Definition at line 347 of file textstream.h.
References end(), flush(), and m_pos.
Referenced by XMLEntityOutputStream::write(), and write().
char SingleCharacterOutputStream::m_buffer[m_bufsize] [private] |
Definition at line 327 of file textstream.h.
const char* SingleCharacterOutputStream::m_end [private] |
Definition at line 329 of file textstream.h.
Referenced by end().
TextOutputStream& SingleCharacterOutputStream::m_ostream [private] |
Definition at line 326 of file textstream.h.
Referenced by flush().
char* SingleCharacterOutputStream::m_pos [private] |
Definition at line 328 of file textstream.h.