Poco::FastInfoset

template < typename ch, typename tr >

class TMemoryStreamBuf

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

Description

This is an implementation of an unbuffered streambuf that works with a shallow copy of an input buffer

Inheritance

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

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

Member Summary

Member Functions: charToInt, overflow, pbackfail, uflow, underflow, xsgetn

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;

openmode protected

typedef typename IOS::openmode openmode;

pos_type protected

typedef typename Base::pos_type pos_type;

Constructors

TMemoryStreamBuf inline

TMemoryStreamBuf(
    const char_type * pMemory,
    std::size_t size
);

TMemoryStreamBuf inline

TMemoryStreamBuf(
    char_type * pMemory,
    std::size_t size
);

Destructor

~TMemoryStreamBuf inline

~TMemoryStreamBuf();

Member Functions

overflow inline

int_type overflow(
    int_type c
);

pbackfail inline

int_type pbackfail(
    int_type c
);

uflow inline

int_type uflow();

underflow inline

int_type underflow();

xsgetn inline

std::streamsize xsgetn(
    char_type * p,
    std::streamsize count
);

Some platforms (for example, Compaq C++) have buggy implementations of xsgetn that handle null buffers incorrectly. Anyway, it does not hurt to provide an optimized implementation of xsgetn for this streambuf implementation.

charToInt protected static inline

static int_type charToInt(
    char_type c
);