SingleCharacterOutputStream Class Reference

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

Detailed Description

A wrapper for a TextOutputStream, optimised for writing a single character at a time.

Definition at line 324 of file textstream.h.


Member Enumeration Documentation

Enumerator:
m_bufsize 

Definition at line 325 of file textstream.h.


Constructor & Destructor Documentation

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().


Member Function Documentation

const char* SingleCharacterOutputStream::end (  )  const [inline, private]

Definition at line 331 of file textstream.h.

References m_end.

Referenced by write().

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]

Definition at line 334 of file textstream.h.

References m_buffer, and m_pos.

Referenced by flush().

std::size_t SingleCharacterOutputStream::write ( const char *  buffer,
std::size_t  length 
) [inline]

Definition at line 353 of file textstream.h.

References end(), and write().

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().


Field Documentation

char SingleCharacterOutputStream::m_buffer[m_bufsize] [private]

Definition at line 327 of file textstream.h.

Referenced by flush(), and reset().

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().

Definition at line 328 of file textstream.h.

Referenced by flush(), reset(), and write().


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

Generated by  doxygen 1.6.2