Library: Foundation
Package: Streams
Header: Poco/BufferedBidirectionalStreamBuf.h
This is an implementation of a buffered bidirectional streambuf that greatly simplifies the implementation of custom streambufs of various kinds. Derived classes only have to override the methods readFromDevice() or writeToDevice().
In contrast to BasicBufferedStreambuf, this class supports simultaneous read and write access, so in addition to istream and ostream this streambuf can also be used for implementing an iostream.
Direct Base Classes: std::basic_streambuf < ch, tr >
All Base Classes: std::basic_streambuf < ch, tr >
Member Functions: getMode, overflow, resetBuffers, setMode, sync, underflow
typedef ba Allocator;
typedef std::basic_streambuf < ch, tr > Base;
typedef std::basic_ios < ch, tr > IOS;
typedef tr char_traits;
typedef ch char_type;
typedef typename Base::int_type int_type;
typedef typename Base::off_type off_type;
typedef typename IOS::openmode openmode;
typedef typename Base::pos_type pos_type;
BasicBufferedBidirectionalStreamBuf(
std::streamsize bufferSize,
openmode mode
);
~BasicBufferedBidirectionalStreamBuf();
virtual int_type overflow(
int_type c
);
virtual int sync();
virtual int_type underflow();
openmode getMode() const;
void resetBuffers();
void setMode(
openmode mode
);