cxxtools::BasicLimitIOStream< char_type > Class Template Reference

This class implements a input/output stream, which limits the number of characters to read and write. More...

#include <cxxtools/limitstream.h>

Inheritance diagram for cxxtools::BasicLimitIOStream< char_type >:
basic_iostream

Public Member Functions

 BasicLimitIOStream (std::basic_iostream< char_type > &sinksource, unsigned icount, unsigned ocount)
 Initialize a limiting I/O stream using a underlying output stream, the number of characters to read and the number of characters to write.
 BasicLimitIOStream (std::basic_iostream< char_type > &sinksource)
 Initialize a limiting I/O stream using a underlying output stream.
 BasicLimitIOStream (std::basic_streambuf< char_type > *sinksource, unsigned icount, unsigned ocount)
 Initialize a limiting I/O stream using a underlying stream buffer, the number of characters to read and the number of characters to write.
 BasicLimitIOStream (std::basic_streambuf< char_type > *sinksource)
 Initialize a limiting I/O stream using a underlying stream buffer.
unsigned icount () const
 returns the number of remaining characters to read.
void icount (unsigned c)
 sets the number of remaining characters to read.
unsigned ocount () const
 returns the number of remaining characters to write.
void ocount (unsigned c)
 sets the number of remaining characters to write.
void attach (std::basic_iostream< char_type > &s)
 sets the underlying stream buffer.
void attach (std::basic_streambuf< char_type > *s)
 sets the underlying stream buffer.

Detailed Description

template<typename char_type>
class cxxtools::BasicLimitIOStream< char_type >

This class implements a input/output stream, which limits the number of characters to read and write.

Constructor & Destructor Documentation

template<typename char_type >
cxxtools::BasicLimitIOStream< char_type >::BasicLimitIOStream ( std::basic_iostream< char_type > &  sinksource,
unsigned  icount,
unsigned  ocount 
)
inline

Initialize a limiting I/O stream using a underlying output stream, the number of characters to read and the number of characters to write.

template<typename char_type >
cxxtools::BasicLimitIOStream< char_type >::BasicLimitIOStream ( std::basic_iostream< char_type > &  sinksource)
inline

Initialize a limiting I/O stream using a underlying output stream.

The number of characters to read and the number of characters to write are initialized to 0.

template<typename char_type >
cxxtools::BasicLimitIOStream< char_type >::BasicLimitIOStream ( std::basic_streambuf< char_type > *  sinksource,
unsigned  icount,
unsigned  ocount 
)
inline

Initialize a limiting I/O stream using a underlying stream buffer, the number of characters to read and the number of characters to write.

template<typename char_type >
cxxtools::BasicLimitIOStream< char_type >::BasicLimitIOStream ( std::basic_streambuf< char_type > *  sinksource)
inline

Initialize a limiting I/O stream using a underlying stream buffer.

The number of characters to read and the number of characters to write are initialized to 0.

Member Function Documentation

template<typename char_type >
void cxxtools::BasicLimitIOStream< char_type >::attach ( std::basic_iostream< char_type > &  s)
inline

sets the underlying stream buffer.

template<typename char_type >
void cxxtools::BasicLimitIOStream< char_type >::attach ( std::basic_streambuf< char_type > *  s)
inline

sets the underlying stream buffer.

template<typename char_type >
unsigned cxxtools::BasicLimitIOStream< char_type >::icount ( ) const
inline

returns the number of remaining characters to read.

template<typename char_type >
void cxxtools::BasicLimitIOStream< char_type >::icount ( unsigned  c)
inline

sets the number of remaining characters to read.

template<typename char_type >
unsigned cxxtools::BasicLimitIOStream< char_type >::ocount ( ) const
inline

returns the number of remaining characters to write.

template<typename char_type >
void cxxtools::BasicLimitIOStream< char_type >::ocount ( unsigned  c)
inline

sets the number of remaining characters to write.


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