Main Page   Class Hierarchy   Alphabetical List   Compound List   Compound Members  

util::io::ListBuffer< E, Tr > Class Template Reference

#include <ListStream.h>

Inheritance diagram for util::io::ListBuffer< E, Tr >:

util::Object List of all members.

Detailed Description

template<class E = char, class Tr = std::char_traits<char>>
class util::io::ListBuffer< E, Tr >

An input/output buffer that stores and retrieves character data to and from a List object.

The buffer is used with the ListBuffer I/O buffer.


Public Methods

 ListBuffer (List< E > &buffer)
 Create a new ListBuffer that writes and reads data to and from the given List.

 ListBuffer (int blockSize=1024)
 Create a new ListBuffer with the given block size.

List< E > & getList ()
 Get a reference to the list the buffer writes its data to or retrieves from.

const List< E > & getList () const
 Get a const reference to the contents of the input buffer.

virtual ~ListBuffer ()
 Destroy the ListBuffer.


Protected Methods

virtual int underflow ()
virtual int overflow (int=traits_type::eof())
virtual std::streamsize xsputn (const E *ptr, std::streamsize count)
virtual std::streamsize xsgetn (E *ptr, std::streamsize count)


Constructor & Destructor Documentation

template<class E = char, class Tr = std::char_traits<char>>
util::io::ListBuffer< E, Tr >::ListBuffer List< E > &    buffer [inline]
 

Create a new ListBuffer that writes and reads data to and from the given List.

Parameters:
buffer  the List the data should be read from and written to.

template<class E = char, class Tr = std::char_traits<char>>
util::io::ListBuffer< E, Tr >::ListBuffer int    blockSize = 1024 [inline]
 

Create a new ListBuffer with the given block size.

Parameters:
blockSize  the number of elements the buffer will grow each time it overflows. Use a reasonable value here to balance between speed and memory consumption.


The documentation for this class was generated from the following file:
Documentation generated on 11.09.2003 with Doxygen.
The documentation is copyrighted material.
Copyright © Topi Mäenpää 2003. All rights reserved.