CppCMS
|
This is a special buffer that allows to "steal" some chunk of text from the output stream. More...
#include <cppcms/steal_buf.h>
Public Member Functions | |
steal_buffer (std::ostream &out) | |
steal_buffer () | |
void | steal (std::ostream &out) |
void | release () |
This is a special buffer that allows to "steal" some chunk of text from the output stream.
It does this by replacing stream's streambuf object with temporary stream buffer that records all data written to the stream and then returns the original buffer upon call to release() member function it steal_buffer destruction.
The Size parameter defines the default chunk of memory allocated on the stack before heap is used.
cppcms::util::steal_buffer< Size >::steal_buffer | ( | std::ostream & | out | ) | [inline] |
Create the buffer and "Steal" the buffer from out
References cppcms::util::steal_buffer< Size >::steal().
cppcms::util::steal_buffer< Size >::steal_buffer | ( | ) | [inline] |
Create an empty buffer
void cppcms::util::steal_buffer< Size >::release | ( | ) | [inline] |
Release the "stolen" buffer back, now the buffer contains all the data that was recorded.
Referenced by cppcms::util::steal_buffer< Size >::steal().
void cppcms::util::steal_buffer< Size >::steal | ( | std::ostream & | out | ) | [inline] |
Steal the buffer from out
References cppcms::util::steal_buffer< Size >::release().
Referenced by cppcms::util::steal_buffer< Size >::steal_buffer().