Public Member Functions |
| | BufferedOutput (std::ostream &os) |
| void | setAlwaysFlush (bool a=true) |
| | Whether to flush the output stream at each output operation.
|
| void | output (const std::string &s) |
| | Writes the passed string into the output.
|
| void | postLineInsert (const std::string &s) |
| | Writes the passed string into the contents to be output after the current line.
|
| void | postDocInsert (const std::string &s) |
| | Writes the passed string into the contents to be output after the entire document.
|
| template<typename T > |
| void | postLineInsertFrom (const T &s) |
| | Writes the elements of the passed generic collection into the contents to be output after the current line.
|
| template<typename T > |
| void | postDocInsertFrom (const T &s) |
| | Writes the elements of the passed generic collection into the contents to be output after the entire document.
|
| void | writePostLine (const std::string &prefix="") |
| | Writes all the (buffered) elements after the current line (and clear the buffer)
|
| void | writePostDoc (const std::string &prefix="") |
| | Writes all the (buffered) elements after the current document (and clear the buffer)
|
Private Member Functions |
| void | writePostInfo (PostContents &post, const std::string &prefix="") |
| | Writes all the (buffered) elements (and clear the buffer)
|
Private Attributes |
|
std::ostream & | outputBuff |
| | the stream used to output strings
|
|
bool | alwaysFlush |
| | whether to flush the output stream at each output operation
|
|
PostContents | postLineContents |
| | the contents to be output after each line
|
|
PostContents | postDocContents |
| | the contents to be output after the entire document
|
The main class for writing into the output.
It wraps an ostream object and can perform buffering. Moreover, it provides functionalities to write something after a line or after an entire document (these contents are buffered so that they can be inserted at any time, with postLineInsert and postDocInsert and will be actually inserted in the output with writePostLine and writePostDoc).