#include <wordWrapStreamBuf.h>
Public Member Functions | |
WordWrapStreamBuf (WordWrapStream *owner, ProgramBase *program) | |
virtual | ~WordWrapStreamBuf () |
Protected Member Functions | |
virtual int | overflow (int c) |
Called by the system ostream implementation when its internal buffer is filled, plus one character. | |
virtual int | sync () |
Called by the system ostream implementation when the buffer should be flushed to output (for instance, on destruction). | |
Private Member Functions | |
void | write_chars (const char *start, int length) |
An internal function called by sync() and overflow() to store one or more characters written to the stream into the memory buffer. | |
void | set_literal_mode (bool mode) |
An internal function called to update the internal state according to the current value of the Notify::literal flag, which might or might not be set of the ostream at any time. | |
void | flush_data () |
Writes the contents of _data to the actual output stream, either word-wrapped or not as appropriate, and empties the contents of _data. | |
Private Attributes | |
string | _data |
WordWrapStream * | _owner |
ProgramBase * | _program |
bool | _literal_mode |
Definition at line 41 of file wordWrapStreamBuf.h.
|
Definition at line 41 of file wordWrapStreamBuf.cxx. |
|
Definition at line 56 of file wordWrapStreamBuf.cxx. References flush_data(), streamsize, and write_chars(). |
|
Writes the contents of _data to the actual output stream, either word-wrapped or not as appropriate, and empties the contents of _data.
Definition at line 156 of file wordWrapStreamBuf.cxx. Referenced by overflow(), and ~WordWrapStreamBuf(). |
|
Called by the system ostream implementation when its internal buffer is filled, plus one character.
Definition at line 94 of file wordWrapStreamBuf.cxx. References _data, _owner, flush_data(), Notify::get_literal_flag(), length, set_literal_mode(), and size_t. |
|
An internal function called to update the internal state according to the current value of the Notify::literal flag, which might or might not be set of the ostream at any time. When the literal flag is true, we should not word-wrap, so toggling this flag means we need to flush the current buffer. Definition at line 42 of file wordWrapStreamBuf.I. Referenced by overflow(). |
|
Called by the system ostream implementation when the buffer should be flushed to output (for instance, on destruction).
Definition at line 73 of file wordWrapStreamBuf.cxx. References streamsize, and write_chars(). |
|
An internal function called by sync() and overflow() to store one or more characters written to the stream into the memory buffer.
Definition at line 124 of file wordWrapStreamBuf.cxx. References _data, _program, and ProgramBase::show_text(). Referenced by sync(), and ~WordWrapStreamBuf(). |
|
Definition at line 55 of file wordWrapStreamBuf.h. Referenced by overflow(), and write_chars(). |
|
Definition at line 58 of file wordWrapStreamBuf.h. |
|
Definition at line 56 of file wordWrapStreamBuf.h. Referenced by overflow(). |
|
Definition at line 57 of file wordWrapStreamBuf.h. Referenced by write_chars(). |