Poco

template < typename ch, typename tr >

class BasicMemoryStreamBuf

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

Description

BasicMemoryStreamBuf is a simple implementation of a stream buffer for reading and writing from a memory area.

This streambuf only supports unidirectional streams. In other words, the BasicMemoryStreamBuf 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: charsWritten, operator =, overflow, reset, seekoff, seekpos, sync, underflow

Types Aliases

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;

pos_type protected

using pos_type = typename Base::pos_type;

Constructors

BasicMemoryStreamBuf

BasicMemoryStreamBuf() = delete;

BasicMemoryStreamBuf

BasicMemoryStreamBuf(
    const BasicMemoryStreamBuf & param302
) = delete;

BasicMemoryStreamBuf inline

BasicMemoryStreamBuf(
    char_type * pBuffer,
    std::streamsize bufferSize
);

Destructor

~BasicMemoryStreamBuf

~BasicMemoryStreamBuf() override = default;

Member Functions

charsWritten inline

std::streamsize charsWritten() const;

operator =

BasicMemoryStreamBuf & operator = (
    const BasicMemoryStreamBuf & param303
) = delete;

overflow inline

int_type overflow(
    int_type
) override;

reset inline

void reset();

Resets the buffer so that current read and write positions will be set to the beginning of the buffer.

seekoff inline

pos_type seekoff(
    off_type off,
    std::ios_base::seekdir way,
    std::ios_base::openmode which = std::ios_base::in | std::ios_base::out
) override;

seekpos inline

pos_type seekpos(
    pos_type pos,
    std::ios_base::openmode which = std::ios_base::in | std::ios_base::out
) override;

sync inline

int sync() override;

underflow inline

int_type underflow() override;