A stream buffer for IODevices with linear buffer area. More...

#include <cxxtools/streambuffer.h>

Inheritance diagram for cxxtools::StreamBuffer:
cxxtools::BasicStreamBuffer< char > cxxtools::Connectable basic_streambuf

Public Member Functions

 StreamBuffer (IODevice &ioDevice, size_t bufferSize=8192, bool extend=false)
 Constructs an IOBuffer for an IODevice.
 StreamBuffer (size_t bufferSize=8192, bool extend=false)
 Default constructor.
 ~StreamBuffer ()
void attach (IODevice &ioDevice)
IODevicedevice ()
void beginRead ()
void endRead ()
size_t beginWrite ()
size_t endWrite ()
void discard ()
- Public Member Functions inherited from cxxtools::BasicStreamBuffer< char >
std::streamsize speekn (char *buffer, std::streamsize size)
std::streamsize out_avail ()
- Public Member Functions inherited from cxxtools::Connectable
 Connectable ()
 Default constructor.
virtual ~Connectable ()
 Closes all connections.
virtual void onConnectionOpen (const Connection &c)
 Registers a Connection with the Connectable.
virtual void onConnectionClose (const Connection &c)
 Unregisters a Connection from the Connectable.
size_t connectionCount () const

Public Attributes

Signal< StreamBuffer & > inputReady
Signal< StreamBuffer & > outputReady

Protected Member Functions

virtual int sync ()
virtual std::streamsize showfull ()
virtual std::streamsize xspeekn (char *buffer, std::streamsize size)
virtual int_type underflow ()
virtual int_type overflow (int_type ch)
virtual int_type pbackfail (int_type c)
virtual pos_type seekoff (off_type offset, std::ios::seekdir sd, std::ios::openmode mode)
 Alters the stream positions.
virtual pos_type seekpos (pos_type p, std::ios::openmode mode)
 Alters the stream positions.
- Protected Member Functions inherited from cxxtools::Connectable
 Connectable (const Connectable &c)
 Copy constructor.
Connectableoperator= (const Connectable &rhs)
 Assignment operator.
const std::list< Connection > & connections () const
 Returns a list of all current connections.
std::list< Connection > & connections ()
 Returns a list of all current connections.
void clear ()

Additional Inherited Members

- Protected Attributes inherited from cxxtools::Connectable
std::list< Connection_connections
 A list of all current connections.

Detailed Description

A stream buffer for IODevices with linear buffer area.

Constructor & Destructor Documentation

cxxtools::StreamBuffer::StreamBuffer ( IODevice ioDevice,
size_t  bufferSize = 8192,
bool  extend = false 
)
explicit

Constructs an IOBuffer for an IODevice.

cxxtools::StreamBuffer::StreamBuffer ( size_t  bufferSize = 8192,
bool  extend = false 
)
explicit

Default constructor.

cxxtools::StreamBuffer::~StreamBuffer ( )

Member Function Documentation

void cxxtools::StreamBuffer::attach ( IODevice ioDevice)
void cxxtools::StreamBuffer::beginRead ( )
size_t cxxtools::StreamBuffer::beginWrite ( )
IODevice* cxxtools::StreamBuffer::device ( )
void cxxtools::StreamBuffer::discard ( )
void cxxtools::StreamBuffer::endRead ( )
size_t cxxtools::StreamBuffer::endWrite ( )
virtual int_type cxxtools::StreamBuffer::overflow ( int_type  ch)
protectedvirtual
virtual int_type cxxtools::StreamBuffer::pbackfail ( int_type  c)
protectedvirtual
virtual pos_type cxxtools::StreamBuffer::seekoff ( off_type  offset,
std::ios::seekdir  sd,
std::ios::openmode  mode 
)
protectedvirtual

Alters the stream positions.

virtual pos_type cxxtools::StreamBuffer::seekpos ( pos_type  p,
std::ios::openmode  mode 
)
protectedvirtual

Alters the stream positions.

virtual std::streamsize cxxtools::StreamBuffer::showfull ( )
protectedvirtual
virtual int cxxtools::StreamBuffer::sync ( )
protectedvirtual
virtual int_type cxxtools::StreamBuffer::underflow ( )
protectedvirtual
virtual std::streamsize cxxtools::StreamBuffer::xspeekn ( char *  buffer,
std::streamsize  size 
)
protectedvirtual

Member Data Documentation

Signal<StreamBuffer&> cxxtools::StreamBuffer::inputReady
Signal<StreamBuffer&> cxxtools::StreamBuffer::outputReady

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