avro::istreambuf Class Reference

Implementation of streambuf for use by the Buffer's istream. More...

#include <BufferStreambuf.hh>

List of all members.

Public Member Functions

 istreambuf (const InputBuffer &buffer)
 Default constructor requires an InputBuffer to read from.
 istreambuf (const OutputBuffer &buffer)
 Default constructor converts an OutputBuffer to an InputBuffer.
const InputBuffergetBuffer () const
 Return the buffer.

Protected Member Functions

virtual int_type underflow ()
 The current chunk of data is exhausted, read the next chunk.
virtual std::streamsize xsgetn (char_type *c, std::streamsize len)
 Get a block of data from the stream.
virtual pos_type seekoff (off_type off, std::ios::seekdir dir, std::_Ios_Openmode)
 Special seek override to navigate InputBuffer chunks.
virtual pos_type seekpos (pos_type pos, std::_Ios_Openmode)
 Calls seekoff for implemention.
virtual std::streamsize showmanyc ()
 Shows the number of bytes buffered in the current chunk, or next chunk if current is exhausted.

Detailed Description

Implementation of streambuf for use by the Buffer's istream.

This class derives from std::streambuf and implements the virtual functions needed to operate on InputBuffer. The override functions are underflow, seekpos, showmanyc, and seek. This is considered a buffered streambuf, because it can access a chunk of the InputBuffer at a time, using the iterator interface. Because the input is already buffered, uflow is not required. pbackfail is not yet implemented but can be if necessary (the inherited behavior is to fail, and has yet to be a problem).


Member Function Documentation

virtual std::streamsize avro::istreambuf::showmanyc (  )  [inline, protected, virtual]

Shows the number of bytes buffered in the current chunk, or next chunk if current is exhausted.

References underflow().

virtual std::streamsize avro::istreambuf::xsgetn ( char_type *  c,
std::streamsize  len 
) [inline, protected, virtual]

Get a block of data from the stream.

Overrides default behavior to ignore eof characters that may reside in the stream.

References avro::InputBuffer::end(), and underflow().


The documentation for this class was generated from the following file:
Generated on Fri Oct 8 14:36:19 2010 for Avro C++ by  doxygen 1.6.3