Static Public Member Functions | |
static void | main (void) |
Unique testing routine. |
static void T13_Out< OutStreamBuf >::main | ( | void | ) | [inline, static] |
Unique testing routine.
Plain files can be used too for buffering. We do not know yet how the temporary files will be created !!!
If the internal buffer is a std::fstream (That is, basically a file), and the output iterator writes into a file too, some optimizations might be possible too.
The role of internal output buffers is to store the output data of the functor. Any container can be used as a sub-thread specific buffer. The interesting point, here, is that the final destination of data is a std::ostream_iterator. For speeding up compilation, the list is put in a derived class.
std::vectors like any other STL-compliant container, can be used as an intermediate output buffer. For speeding up compilation, there are put in a derived class.
This is one of the buffer types that we will use, and this one is in fact streamed, and based on a std::stringstream. It is possible to use any other class compatible with a std::stringstream.
If the internal buffer is a std::stringstream, and the output iterator is a std::ostream, flushing can be optimised by writing the internal content of the std::stringstream, in one go.