class Poco::TeeStreamBuf
Overview
This stream buffer copies all data written to or read from it to one or multiple output streams. Moreā¦
#include <TeeStream.h> class TeeStreamBuf: public Poco::BasicUnbufferedStreamBuf { public: // construction TeeStreamBuf(); TeeStreamBuf(std::istream& istr); TeeStreamBuf(std::ostream& ostr); // methods void addStream(std::ostream& ostr); protected: // methods virtual int readFromDevice(); int writeToDevice(char c); };
Inherited Members
public: // methods virtual int_type overflow(int_type c); virtual int_type underflow(); virtual int_type uflow(); virtual int_type pbackfail(int_type c); virtual std::streamsize xsgetn( char_type* p, std::streamsize count ); protected: // typedefs typedef std::basic_streambuf<ch, tr> Base; typedef std::basic_ios<ch, tr> IOS; typedef ch char_type; typedef tr char_traits; typedef Base::int_type int_type; typedef Base::pos_type pos_type; typedef Base::off_type off_type; typedef IOS::openmode openmode; // methods static int_type charToInt(char_type c);
Detailed Documentation
This stream buffer copies all data written to or read from it to one or multiple output streams.
Construction
TeeStreamBuf()
Creates an unconnected CountingStreamBuf.
Use addStream() to attach output streams.
TeeStreamBuf(std::istream& istr)
Creates the CountingStreamBuf and connects it to the given input stream.
TeeStreamBuf(std::ostream& ostr)
Creates the CountingStreamBuf and connects it to the given output stream.
Methods
void addStream(std::ostream& ostr)
Adds the given output stream.