cartobase  5.0.5
carto::fostreambuf< Inserter > Class Template Reference

Filtering output stream. More...

#include <cartobase/stream/fostreambuf.h>

Inheritance diagram for carto::fostreambuf< Inserter >:
Collaboration diagram for carto::fostreambuf< Inserter >:

Public Member Functions

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

Protected Member Functions

Put area
virtual int overflow (int c)
 
Buffer management and positioning
virtual int sync ()
 
virtual std::streambuf * setbuf (char *p, int len)
 pass on to the sink More...
 

Detailed Description

template<class Inserter>
class carto::fostreambuf< Inserter >

Filtering output stream.

Definition at line 59 of file fostreambuf.h.

Constructor & Destructor Documentation

◆ fostreambuf() [1/2]

template<class Inserter >
carto::fostreambuf< Inserter >::fostreambuf ( std::streambuf *  sink,
const Inserter &  inserter,
bool  d = false 
)

Initialize with another streambuf as the sink.

Parameters
sinksink streambuf
inserterfilter
ddelete the sink streambuf on exit

◆ fostreambuf() [2/2]

template<class Inserter >
carto::fostreambuf< Inserter >::fostreambuf ( std::streambuf *  sink,
bool  d = false 
)

Initialize with another streambuf as the sink.

Parameters
sinksink streambuf
ddelete the sink streambuf on exit

◆ ~fostreambuf()

template<class Inserter >
virtual carto::fostreambuf< Inserter >::~fostreambuf ( )
virtual

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

Member Function Documentation

◆ inserter()

template<class Inserter >
Inserter & carto::fostreambuf< Inserter >::inserter ( )
inline

Actual filter.

Returns
the actual filter

Definition at line 156 of file fostreambuf.h.

◆ overflow()

template<class Inserter >
virtual int carto::fostreambuf< Inserter >::overflow ( int  c)
protectedvirtual

◆ setbuf()

template<class Inserter >
virtual std::streambuf* carto::fostreambuf< Inserter >::setbuf ( char *  p,
int  len 
)
protectedvirtual

pass on to the sink

Parameters
p
len
Returns
this

◆ sync()

template<class Inserter >
virtual int carto::fostreambuf< Inserter >::sync ( )
protectedvirtual

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