template < typename ch, typename tr >

class BasicMemoryStreamBuf

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


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.


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

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

Member Summary

Member Functions: charsWritten, overflow, reset, seekoff, sync, underflow


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;

pos_type protected

typedef typename Base::pos_type pos_type;


BasicMemoryStreamBuf inline

    char_type * pBuffer,
    std::streamsize bufferSize


~BasicMemoryStreamBuf inline


Member Functions

charsWritten inline

std::streamsize charsWritten() const;

overflow virtual inline

virtual int_type overflow(

reset inline

void reset();

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

seekoff virtual inline

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

sync virtual inline

virtual int sync();

underflow virtual inline

virtual int_type underflow();