mod_servlet
C++Servlets
|
Implementation of filtered sink. More...
#include <io_filter.h>
Public Member Functions | |
basic_filtered_sink (basic_sink< CharT > *sink) | |
Constructs the object with the sink to which all filtered data will be passed. More... | |
~basic_filtered_sink () noexceptoverride | |
Destroys this object. | |
std::streamsize | write (CharT *s, std::streamsize n) override |
Writes the first n characters of array s into the sink. More... | |
void | flush () override |
Flush sink if it can be flushed. More... | |
void | add_filter (basic_out_filter< CharT > *filter, bool delete_after_use=true) |
Adds new filter to the end of the filter chain. More... | |
![]() | |
virtual | ~basic_sink () noexcept=default |
Virtual constructor. | |
Implementation of filtered sink.
This implementation supports multiple filters arranged as a chain.
CharT | character type |
|
inlineexplicit |
Constructs the object with the sink to which all filtered data will be passed.
When this object is destroyed it will delete the sink as well.
sink | Last sink to which all the filtered data will be passed |
|
inline |
Adds new filter to the end of the filter chain.
filter | Ponter to filter to add to the filter chain |
delete_after_use | if this flag is true than the filter will be deleted on destruction of this object |
|
inlineoverridevirtual |
Flush sink if it can be flushed.
Otherwise do nothing.
Reimplemented from servlet::basic_sink< CharT >.
|
inlineoverridevirtual |
Writes the first n
characters of array s
into the sink.
s | Pointer to an array of at least n elements |
n | Number of characters to write. |
Implements servlet::basic_sink< CharT >.