Json Box
0.6.1
This is a JSON C++ library. It can write and read JSON files with ease and speed.
|
#include <OutputFilter.h>
Inherits streambuf.
Public Member Functions | |
OutputFilter (std::streambuf *newDestination, Inserter newInserter, bool newDeleteWhenFinished=false) | |
OutputFilter (std::streambuf *newDestination, bool newDeleteWhenFinished=false) | |
virtual | ~OutputFilter () |
virtual int_type | overflow (int_type ch) |
virtual int_type | underflow () |
Inserter & | getInserter () |
std::streambuf * | getDestination () const |
Private Attributes | |
std::streambuf * | destination |
Pointer to the destination streambuf. More... | |
Inserter | inserter |
bool | deleteWhenFinished |
Templated class used to filter output in an std::ostream. The custom mechanic of the filtering is easily implemented in the given Inserter. An output filter can be used to add indentation to an std::ostream, it can be used to log an std::ostream, etc.
Inserter | Type used as the inserter for the output filter. |
|
inline |
Parameterized constructor.
newDestination | Pointer to the streambuf destination. |
newInserter | Inserter to use to filter the output. |
newDeleteWhenFinished | Used to know if the instance will have to delete its destination streambuf or not. |
|
inline |
Parameterized constructor.
newDestination | Pointer to the streambuf destination. |
newDeleteWhenFinished | Used to know if the instance will have to delete its destination streambuf or not. |
|
inlinevirtual |
Destructor. Takes care of deleting the destination streambuf if necessary.
|
inline |
Gets the destination streambuf.
|
inline |
Gets the inserter's instance.
|
inlinevirtual |
Actual function that calls the inserter to filter the output.
|
inlinevirtual |
Since it's an output filter, we don't need to do anything here.
|
private |
Bool used to know if the filter must delete its destination filter or not.
|
private |
Pointer to the destination streambuf.
|
private |
Inserter to use to insert new characters in the destination streambuf.