code::InputStream Class Reference

Inheritance diagram for code::InputStream:

code::AIStream code::BOIStream List of all members.

Detailed Description

An abstract base class that provides an overloaded >> operator for many basic types.

On the CODE system, there are two subclasses of OutputStream: AIStream which provides an ASCII stream BOIStream which provides a portable binary representation

Typically, most classes will provide a friend stream << representation. That representation will then work in providing both types of streamed output.

float and double are not provided in this abstract class because there is no portable way to represent them in binary; you will find those operators in AIStream only.

Author:
: Lakshman
Version:
:
Id
code_IOStream.h,v 1.10 2009/06/02 20:17:39 lakshman Exp
See also:
NetworkFormat

AsciiDump


Public Member Functions

virtual InputStreamoperator>> (bool &)=0 throw ( std::string )
 Read a string from the stream, throwing an error message on failure.
virtual InputStreamoperator>> (char &)=0 throw ( std::string )
 Read a char from the stream, throwing an error message on failure.
virtual InputStreamoperator>> (unsigned char &)=0 throw ( std::string )
 Read an unsigned char from the stream, throwing an error message on failure.
virtual InputStreamoperator>> (int16_t &)=0 throw ( std::string )
 Read a 16-bit signed integer from the stream, throwing an error message on failure.
virtual InputStreamoperator>> (uint16_t &)=0 throw ( std::string )
 Read a 16-bit unsigned integer from the stream, throwing an error message on failure.
virtual InputStreamoperator>> (int32_t &)=0 throw ( std::string )
 Read a 32-bit signed integer from the stream, throwing an error message on failure.
virtual InputStreamoperator>> (uint32_t &)=0 throw ( std::string )
 Read a 32-bit unsigned integer from the stream, throwing an error message on failure.
virtual InputStreamoperator>> (int64_t &)=0 throw ( std::string )
 Read a 64-bit signed integer from the stream, throwing an error message on failure.
virtual InputStreamoperator>> (uint64_t &)=0 throw ( std::string )
 Read a 64-bit unsigned integer from the stream, throwing an error message on failure.
virtual InputStreamoperator>> (float &)=0 throw ( std::string )
 Extract a float from the input stream.
virtual InputStreamoperator>> (double &)=0 throw ( std::string )
 Extract a double from the input stream.
virtual InputStreamoperator>> (std::string &)=0 throw ( std::string )
 Extract a std::string from the input stream.
virtual ~InputStream ()
 Virtual destructor for subclassing.


Constructor & Destructor Documentation

virtual code::InputStream::~InputStream (  )  [inline, virtual]

Virtual destructor for subclassing.


Member Function Documentation

virtual InputStream& code::InputStream::operator>> ( std::string &   )  throw ( std::string ) [pure virtual]

Extract a std::string from the input stream.

If an error occurs while reading from the stream, an explanatory std::string will be thrown and the reference argument will be unchanged.

Exceptions:
std::string 

Implemented in code::AIStream, and code::BOIStream.

virtual InputStream& code::InputStream::operator>> ( double &   )  throw ( std::string ) [pure virtual]

Extract a double from the input stream.

WARNING: doubles are not really very portable. If you are defining a new data format, please use int/long, multiplying your value by the needed precision. This is for those formats that do use double and can not be helped.

If an error occurs while reading from the stream, an explanatory std::string will be thrown and the reference argument will be unchanged.

Exceptions:
std::string 

Implemented in code::AIStream, and code::BOIStream.

virtual InputStream& code::InputStream::operator>> ( float &   )  throw ( std::string ) [pure virtual]

Extract a float from the input stream.

WARNING: doubles are not really very portable. If you are defining a new data format, please use int/long, multiplying your value by the needed precision. This is for those formats that do use double and can not be helped.

If an error occurs while reading from the stream, an explanatory std::string will be thrown and the reference argument will be unchanged.

Exceptions:
std::string 

Implemented in code::AIStream, and code::BOIStream.

virtual InputStream& code::InputStream::operator>> ( uint64_t  )  throw ( std::string ) [pure virtual]

Read a 64-bit unsigned integer from the stream, throwing an error message on failure.

Implemented in code::AIStream, and code::BOIStream.

virtual InputStream& code::InputStream::operator>> ( int64_t  )  throw ( std::string ) [pure virtual]

Read a 64-bit signed integer from the stream, throwing an error message on failure.

Implemented in code::AIStream, and code::BOIStream.

virtual InputStream& code::InputStream::operator>> ( uint32_t  )  throw ( std::string ) [pure virtual]

Read a 32-bit unsigned integer from the stream, throwing an error message on failure.

Implemented in code::AIStream, and code::BOIStream.

virtual InputStream& code::InputStream::operator>> ( int32_t  )  throw ( std::string ) [pure virtual]

Read a 32-bit signed integer from the stream, throwing an error message on failure.

Implemented in code::AIStream, and code::BOIStream.

virtual InputStream& code::InputStream::operator>> ( uint16_t  )  throw ( std::string ) [pure virtual]

Read a 16-bit unsigned integer from the stream, throwing an error message on failure.

Implemented in code::AIStream, and code::BOIStream.

virtual InputStream& code::InputStream::operator>> ( int16_t  )  throw ( std::string ) [pure virtual]

Read a 16-bit signed integer from the stream, throwing an error message on failure.

Implemented in code::AIStream, and code::BOIStream.

virtual InputStream& code::InputStream::operator>> ( unsigned char &   )  throw ( std::string ) [pure virtual]

Read an unsigned char from the stream, throwing an error message on failure.

Implemented in code::AIStream, and code::BOIStream.

virtual InputStream& code::InputStream::operator>> ( char &   )  throw ( std::string ) [pure virtual]

Read a char from the stream, throwing an error message on failure.

Implemented in code::AIStream, and code::BOIStream.

virtual InputStream& code::InputStream::operator>> ( bool &   )  throw ( std::string ) [pure virtual]

Read a string from the stream, throwing an error message on failure.

Implemented in code::AIStream, and code::BOIStream.


Generated on Fri May 4 13:40:13 2012 for WDSS-IIw2 by  doxygen 1.4.7