Poco

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

class BasicBufferedStreamBuf

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

Description

This is an implementation of a buffered streambuf that greatly simplifies the implementation of custom streambufs of various kinds. Derived classes only have to override the methods readFromDevice() or writeToDevice().

This streambuf only supports unidirectional streams. In other words, the BasicBufferedStreamBuf can be used for the implementation of an istream or an ostream, but not for 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, 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

BasicBufferedStreamBuf

BasicBufferedStreamBuf(
    const BasicBufferedStreamBuf & param210
) = delete;

BasicBufferedStreamBuf inline

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

Destructor

~BasicBufferedStreamBuf inline

~BasicBufferedStreamBuf() override;

Member Functions

operator =

BasicBufferedStreamBuf & operator = (
    const BasicBufferedStreamBuf & param211
) = delete;

overflow inline

int_type overflow(
    int_type c
) override;

sync inline

int sync() override;

underflow inline

int_type underflow() override;

getMode protected inline

openmode getMode() const;

setMode protected inline

void setMode(
    openmode mode
);