Poco

template < typename ch, typename tr >

class BasicMemoryStreamBuf

File Information

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, overflow, reset, seekoff, seekpos, sync, underflow

Types

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;

Constructors

BasicMemoryStreamBuf inline

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

Destructor

~BasicMemoryStreamBuf inline

~BasicMemoryStreamBuf();

Member Functions

charsWritten inline

std::streamsize charsWritten() const;

overflow virtual inline

virtual int_type overflow(
    int_type
);

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

seekpos virtual inline

virtual pos_type seekpos(
    pos_type pos,
    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();

Securely control IoT edge devices from anywhere   Connect a Device