Ark Server API (ASE) - Wiki
Loading...
Searching...
No Matches
Poco::BasicUnbufferedStreamBuf< ch, tr > Class Template Reference

#include <UnbufferedStreamBuf.h>

+ Inheritance diagram for Poco::BasicUnbufferedStreamBuf< ch, tr >:
+ Collaboration diagram for Poco::BasicUnbufferedStreamBuf< ch, tr >:

Public Member Functions

 BasicUnbufferedStreamBuf ()
 
 ~BasicUnbufferedStreamBuf ()
 
virtual int_type overflow (int_type c)
 
virtual int_type underflow ()
 
virtual int_type uflow ()
 
virtual int_type pbackfail (int_type c)
 
virtual std::streamsize xsgetn (char_type *p, std::streamsize count)
 

Protected Types

typedef std::basic_streambuf< ch, trBase
 
typedef std::basic_ios< ch, trIOS
 
typedef ch char_type
 
typedef tr char_traits
 
typedef Base::int_type int_type
 
typedef Base::pos_type pos_type
 
typedef Base::off_type off_type
 
typedef IOS::openmode openmode
 

Static Protected Member Functions

static int_type charToInt (char_type c)
 

Private Member Functions

virtual int_type readFromDevice ()
 
virtual int_type writeToDevice (char_type)
 
 BasicUnbufferedStreamBuf (const BasicUnbufferedStreamBuf &)
 
BasicUnbufferedStreamBufoperator= (const BasicUnbufferedStreamBuf &)
 

Private Attributes

int_type _pb
 
bool _ispb
 

Detailed Description

template<typename ch, typename tr>
class Poco::BasicUnbufferedStreamBuf< ch, tr >

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

Definition at line 32 of file UnbufferedStreamBuf.h.

Member Typedef Documentation

◆ Base

template<typename ch , typename tr >
typedef std::basic_streambuf<ch, tr> Poco::BasicUnbufferedStreamBuf< ch, tr >::Base
protected

Definition at line 40 of file UnbufferedStreamBuf.h.

◆ char_traits

template<typename ch , typename tr >
typedef tr Poco::BasicUnbufferedStreamBuf< ch, tr >::char_traits
protected

Definition at line 43 of file UnbufferedStreamBuf.h.

◆ char_type

template<typename ch , typename tr >
typedef ch Poco::BasicUnbufferedStreamBuf< ch, tr >::char_type
protected

Definition at line 42 of file UnbufferedStreamBuf.h.

◆ int_type

template<typename ch , typename tr >
typedef Base::int_type Poco::BasicUnbufferedStreamBuf< ch, tr >::int_type
protected

Definition at line 44 of file UnbufferedStreamBuf.h.

◆ IOS

template<typename ch , typename tr >
typedef std::basic_ios<ch, tr> Poco::BasicUnbufferedStreamBuf< ch, tr >::IOS
protected

Definition at line 41 of file UnbufferedStreamBuf.h.

◆ off_type

template<typename ch , typename tr >
typedef Base::off_type Poco::BasicUnbufferedStreamBuf< ch, tr >::off_type
protected

Definition at line 46 of file UnbufferedStreamBuf.h.

◆ openmode

template<typename ch , typename tr >
typedef IOS::openmode Poco::BasicUnbufferedStreamBuf< ch, tr >::openmode
protected

Definition at line 47 of file UnbufferedStreamBuf.h.

◆ pos_type

template<typename ch , typename tr >
typedef Base::pos_type Poco::BasicUnbufferedStreamBuf< ch, tr >::pos_type
protected

Definition at line 45 of file UnbufferedStreamBuf.h.

Constructor & Destructor Documentation

◆ BasicUnbufferedStreamBuf() [1/2]

template<typename ch , typename tr >
Poco::BasicUnbufferedStreamBuf< ch, tr >::BasicUnbufferedStreamBuf ( )
inline

Definition at line 50 of file UnbufferedStreamBuf.h.

◆ ~BasicUnbufferedStreamBuf()

template<typename ch , typename tr >
Poco::BasicUnbufferedStreamBuf< ch, tr >::~BasicUnbufferedStreamBuf ( )
inline

Definition at line 58 of file UnbufferedStreamBuf.h.

◆ BasicUnbufferedStreamBuf() [2/2]

template<typename ch , typename tr >
Poco::BasicUnbufferedStreamBuf< ch, tr >::BasicUnbufferedStreamBuf ( const BasicUnbufferedStreamBuf< ch, tr > & )
private

Member Function Documentation

◆ charToInt()

template<typename ch , typename tr >
static int_type Poco::BasicUnbufferedStreamBuf< ch, tr >::charToInt ( char_type c)
inlinestaticprotected

Definition at line 139 of file UnbufferedStreamBuf.h.

◆ operator=()

template<typename ch , typename tr >
BasicUnbufferedStreamBuf & Poco::BasicUnbufferedStreamBuf< ch, tr >::operator= ( const BasicUnbufferedStreamBuf< ch, tr > & )
private

◆ overflow()

template<typename ch , typename tr >
virtual int_type Poco::BasicUnbufferedStreamBuf< ch, tr >::overflow ( int_type c)
inlinevirtual

Definition at line 62 of file UnbufferedStreamBuf.h.

◆ pbackfail()

template<typename ch , typename tr >
virtual int_type Poco::BasicUnbufferedStreamBuf< ch, tr >::pbackfail ( int_type c)
inlinevirtual

Definition at line 106 of file UnbufferedStreamBuf.h.

◆ readFromDevice()

template<typename ch , typename tr >
virtual int_type Poco::BasicUnbufferedStreamBuf< ch, tr >::readFromDevice ( )
inlineprivatevirtual

Reimplemented in Poco::NullStreamBuf.

Definition at line 145 of file UnbufferedStreamBuf.h.

◆ uflow()

template<typename ch , typename tr >
virtual int_type Poco::BasicUnbufferedStreamBuf< ch, tr >::uflow ( )
inlinevirtual

Definition at line 88 of file UnbufferedStreamBuf.h.

◆ underflow()

template<typename ch , typename tr >
virtual int_type Poco::BasicUnbufferedStreamBuf< ch, tr >::underflow ( )
inlinevirtual

Definition at line 70 of file UnbufferedStreamBuf.h.

◆ writeToDevice()

template<typename ch , typename tr >
virtual int_type Poco::BasicUnbufferedStreamBuf< ch, tr >::writeToDevice ( char_type )
inlineprivatevirtual

Definition at line 150 of file UnbufferedStreamBuf.h.

◆ xsgetn()

template<typename ch , typename tr >
virtual std::streamsize Poco::BasicUnbufferedStreamBuf< ch, tr >::xsgetn ( char_type * p,
std::streamsize count )
inlinevirtual

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.

Definition at line 120 of file UnbufferedStreamBuf.h.

Member Data Documentation

◆ _ispb

template<typename ch , typename tr >
bool Poco::BasicUnbufferedStreamBuf< ch, tr >::_ispb
private

Definition at line 156 of file UnbufferedStreamBuf.h.

◆ _pb

template<typename ch , typename tr >
int_type Poco::BasicUnbufferedStreamBuf< ch, tr >::_pb
private

Definition at line 155 of file UnbufferedStreamBuf.h.


The documentation for this class was generated from the following file: