cartobase 6.0.6
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.
 
 fostreambuf (std::streambuf *sink, bool d=false)
 Initialize with another streambuf as the sink.
 
virtual ~fostreambuf ()
 Call sync(), delete the sink streambuf if asked to do so in the constructor.
 
Filtering
Inserter & inserter ()
 Actual filter.
 

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
 

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

References inserter().

◆ 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.

References inserter().

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.

Referenced by fostreambuf(), and ~fostreambuf().

◆ 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: