template < typename ch, typename tr, typename ba = BufferAllocator < ch >>

class BasicBufferedBidirectionalStreamBuf

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 Summary

Member Functions: getMode, overflow, resetBuffers, setMode, sync, underflow


Allocator protected

typedef ba Allocator;

Base protected

typedef std::basic_streambuf < ch, tr > Base;

IOS protected

typedef std::basic_ios < ch, tr > IOS;

char_traits protected

typedef tr char_traits;

char_type protected

typedef ch char_type;

int_type protected

typedef typename Base::int_type int_type;

off_type protected

typedef typename Base::off_type off_type;

openmode protected

typedef typename IOS::openmode openmode;

pos_type protected

typedef typename Base::pos_type pos_type;


BasicBufferedBidirectionalStreamBuf inline

    std::streamsize bufferSize,
    openmode mode


~BasicBufferedBidirectionalStreamBuf inline


Member Functions

overflow virtual inline

virtual int_type overflow(
    int_type c

sync virtual inline

virtual int sync();

underflow virtual inline

virtual int_type underflow();

getMode protected inline

openmode getMode() const;

resetBuffers protected inline

void resetBuffers();

setMode protected inline

void setMode(
    openmode mode