Poco

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

class BasicBufferedBidirectionalStreamBuf

Library: Foundation
Package: Streams
Header: Poco/BufferedBidirectionalStreamBuf.h

Description

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.

Inheritance

Direct Base Classes: std::basic_streambuf < ch, tr >

All Base Classes: std::basic_streambuf < ch, tr >

Member Summary

Member Functions: getMode, operator =, overflow, resetBuffers, resizeBuffer, setMode, sync, underflow

Types Aliases

Allocator protected

using Allocator = ba;

Base protected

using Base = std::basic_streambuf < ch, tr >;

IOS protected

using IOS = std::basic_ios < ch, tr >;

char_traits protected

using char_traits = tr;

char_type protected

using char_type = ch;

int_type protected

using int_type = typename Base::int_type;

off_type protected

using off_type = typename Base::off_type;

openmode protected

using openmode = typename IOS::openmode;

pos_type protected

using pos_type = typename Base::pos_type;

Constructors

BasicBufferedBidirectionalStreamBuf

BasicBufferedBidirectionalStreamBuf(
    const BasicBufferedBidirectionalStreamBuf & param204
) = delete;

BasicBufferedBidirectionalStreamBuf inline

BasicBufferedBidirectionalStreamBuf(
    std::streamsize bufferSize,
    openmode mode
);

Destructor

~BasicBufferedBidirectionalStreamBuf inline

~BasicBufferedBidirectionalStreamBuf();

Member Functions

operator =

BasicBufferedBidirectionalStreamBuf & operator = (
    const BasicBufferedBidirectionalStreamBuf & param205
) = delete;

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();

resizeBuffer protected virtual inline

virtual bool resizeBuffer(
    std::streamsize bufferSize
);

setMode protected inline

void setMode(
    openmode mode
);