cartobase  5.0.5
carto::fistreambuf< Extractor > Class Template Reference

Filtering input stream. More...

#include <cartobase/stream/fistreambuf.h>

Inheritance diagram for carto::fistreambuf< Extractor >:
Collaboration diagram for carto::fistreambuf< Extractor >:

Public Member Functions

Constructors, destructor
 fistreambuf (std::streambuf *source, const Extractor &extractor, bool d=false)
 Initialize with another streambuf as the source. More...
 
 fistreambuf (std::streambuf *source, bool d=false)
 Initialize with another streambuf as the source. More...
 
virtual ~fistreambuf ()
 Call sync(), delete the source streambuf if asked to do so in the constructor. More...
 
Filtering
Extractor & extractor ()
 Actual filter. More...
 

Protected Member Functions

Get area
virtual int underflow ()
 Get the first character of the pending sequence. More...
 
Buffer management and positioning
virtual int sync ()
 
virtual std::streambuf * setbuf (char *p, std::streamsize len)
 pass on to the source More...
 
virtual pos_type seekoff (off_type, std::ios_base::seekdir, std::ios_base::openmode=std::ios_base::in|std::ios_base::out)
 

Detailed Description

template<class Extractor>
class carto::fistreambuf< Extractor >

Filtering input stream.

Definition at line 59 of file fistreambuf.h.

Constructor & Destructor Documentation

◆ fistreambuf() [1/2]

template<class Extractor>
carto::fistreambuf< Extractor >::fistreambuf ( std::streambuf *  source,
const Extractor &  extractor,
bool  d = false 
)

Initialize with another streambuf as the source.

Parameters
sourcesource streambuf
extractorfilter
ddelete the source streambuf on exit

◆ fistreambuf() [2/2]

template<class Extractor>
carto::fistreambuf< Extractor >::fistreambuf ( std::streambuf *  source,
bool  d = false 
)

Initialize with another streambuf as the source.

Parameters
sourcesource streambuf
ddelete the source streambuf on exit

◆ ~fistreambuf()

template<class Extractor>
virtual carto::fistreambuf< Extractor >::~fistreambuf ( )
virtual

Call sync(), delete the source streambuf if asked to do so in the constructor.

Member Function Documentation

◆ extractor()

template<class Extractor >
Extractor & carto::fistreambuf< Extractor >::extractor ( )
inline

Actual filter.

Returns
the actual filter

Definition at line 166 of file fistreambuf.h.

◆ seekoff()

template<class Extractor>
virtual pos_type carto::fistreambuf< Extractor >::seekoff ( off_type  ,
std::ios_base::seekdir  ,
std::ios_base::openmode  = std::ios_base::in|std::ios_base::out 
)
protectedvirtual

◆ setbuf()

template<class Extractor>
virtual std::streambuf* carto::fistreambuf< Extractor >::setbuf ( char *  p,
std::streamsize  len 
)
protectedvirtual

pass on to the source

Parameters
p
len
Returns
this

◆ sync()

template<class Extractor>
virtual int carto::fistreambuf< Extractor >::sync ( )
protectedvirtual

◆ underflow()

template<class Extractor>
virtual int carto::fistreambuf< Extractor >::underflow ( )
protectedvirtual

Get the first character of the pending sequence.

If the pending sequence is null then the function returns EOF to indicate failure.

Returns
the first character of the pending sequence

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