mod_servlet
C++Servlets
 All Classes Files Functions Variables Typedefs Macros Pages
servlet::basic_filtered_source< CharT > Class Template Reference

Implementation of filtered source. More...

#include <io_filter.h>

Inheritance diagram for servlet::basic_filtered_source< CharT >:
servlet::basic_source< CharT >

Public Member Functions

 basic_filtered_source (basic_source< CharT > *src)
 Constructs the object with the source from which all the data to be filtered will be acquired. More...
 
std::streamsize read (CharT *s, std::streamsize n) override
 Extracts at most n characters from the source into the provided s array. More...
 
void add_filter (basic_in_filter< CharT > *filter, bool delete_after_use=true)
 Adds new filter to the end of the filter chain. More...
 
- Public Member Functions inherited from servlet::basic_source< CharT >
virtual ~basic_source () noexcept=default
 Virtual constructor.
 

Detailed Description

template<typename CharT>
class servlet::basic_filtered_source< CharT >

Implementation of filtered source.

This implementation supports multiple filters arranged as a chain.

Template Parameters
CharTcharacter type
See Also
basic_source

Constructor & Destructor Documentation

template<typename CharT >
servlet::basic_filtered_source< CharT >::basic_filtered_source ( basic_source< CharT > *  src)
inlineexplicit

Constructs the object with the source from which all the data to be filtered will be acquired.

When this object is destroyed it will delete the source as well.

Parameters
srcLast sink to which all the filtered data will be passed

Member Function Documentation

template<typename CharT >
void servlet::basic_filtered_source< CharT >::add_filter ( basic_in_filter< CharT > *  filter,
bool  delete_after_use = true 
)
inline

Adds new filter to the end of the filter chain.

Parameters
filterPonter to filter to add to the filter chain
delete_after_useif this flag is true than the filter will be deleted on destruction of this object
template<typename CharT >
std::streamsize servlet::basic_filtered_source< CharT >::read ( CharT *  s,
std::streamsize  n 
)
inlineoverridevirtual

Extracts at most n characters from the source into the provided s array.

Parameters
sPointer to an array where the extracted characters are stored.
nNumber of characters to extract.
Returns
Number of characters actually extracted.

Implements servlet::basic_source< CharT >.


The documentation for this class was generated from the following file: