Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

rovsoft::io::IStreamer Class Reference

This class defines the interface for reading data. More...

#include <IStreamer.hh>

Inheritance diagram for rovsoft::io::IStreamer:

Inheritance graph
[legend]
List of all members.

Public Member Functions

virtual char readChar ()=0 throw (IOExceptionPtr)
 Reads a single character.
virtual char readByte ()=0 throw (IOExceptionPtr)
 Reads a single byte.
virtual unsigned char readUByte ()=0 throw (IOExceptionPtr)
 Reads a single unsigned byte.
virtual short readShort ()=0 throw (IOExceptionPtr)
 Reads a single short int.
virtual unsigned short readUShort ()=0 throw (IOExceptionPtr)
 Reads a single unsigned short int.
virtual long readLong ()=0 throw (IOExceptionPtr)
 Reads a single long int.
virtual unsigned long readULong ()=0 throw (IOExceptionPtr)
 Reads a single unsigned long int.
virtual long long readLongLong ()=0 throw (IOExceptionPtr)
 Reads a single long long int.
virtual unsigned long long readULongLong ()=0 throw (IOExceptionPtr)
 Reads a single unsigned long long int.
virtual float readFloat ()=0 throw (IOExceptionPtr)
 Reads a single float.
virtual double readDouble ()=0 throw (IOExceptionPtr)
 Reads a single double.
virtual std::string readString ()=0 throw (IOExceptionPtr)
virtual std::string readString (int length)=0 throw (IOExceptionPtr)
 Reads a string with fix length.
virtual bool endOfStream ()=0
 Test if we are at the end of a stream.
virtual ~IStreamer ()
 Virtual empty destructor.

Detailed Description

This class defines the interface for reading data.


Constructor & Destructor Documentation

virtual rovsoft::io::IStreamer::~IStreamer  )  [inline, virtual]
 

Virtual empty destructor.


Member Function Documentation

virtual bool rovsoft::io::IStreamer::endOfStream  )  [pure virtual]
 

Test if we are at the end of a stream.

Returns:
true if the end is reached. (E.g. end of file)
Todo:
Make common base classes for ASCII IStreamer and Binary IStreamer and ASCII OStreamer and Binary OStreamer, that define an i/o stream and the method endOfStream().

Todo:
If we need something special for TCP I/O streams, then maybe extend ASCII IO Streamer for this functionality.
Maybe completely rework the hierarchie.

Implemented in rovsoft::io::AsciiIStreamer, and rovsoft::io::BinaryIStreamer.

virtual char rovsoft::io::IStreamer::readByte  )  throw (IOExceptionPtr) [pure virtual]
 

Reads a single byte.

Implemented in rovsoft::io::AsciiIStreamer, rovsoft::io::BinaryIStreamer, rovsoft::io::BinaryLenSegmentIStreamer, and rovsoft::io::BinarySubstitutionIStreamer.

virtual char rovsoft::io::IStreamer::readChar  )  throw (IOExceptionPtr) [pure virtual]
 

Reads a single character.

There is no difference betwenn readChar and readByte if the underlying protocol is a binary one, if the underlying protocol is string based, then readChar would return for the character '1' the character '1', readByte and readUByte would return '\1', or just 1, (The number, not the character '1'). So readByte and readUByte could actually read up to 4 characters (1 because of the '-' sign) from the stream and interprets them as number, readChar will always only read one byte interpreting it as a character.

Implemented in rovsoft::io::AsciiIStreamer, rovsoft::io::BinaryIStreamer, and rovsoft::io::BinaryLenSegmentIStreamer.

virtual double rovsoft::io::IStreamer::readDouble  )  throw (IOExceptionPtr) [pure virtual]
 

Reads a single double.

Implemented in rovsoft::io::AsciiIStreamer, rovsoft::io::BinaryIStreamer, and rovsoft::io::BinaryLenSegmentIStreamer.

virtual float rovsoft::io::IStreamer::readFloat  )  throw (IOExceptionPtr) [pure virtual]
 

Reads a single float.

Implemented in rovsoft::io::AsciiIStreamer, rovsoft::io::BinaryIStreamer, and rovsoft::io::BinaryLenSegmentIStreamer.

virtual long rovsoft::io::IStreamer::readLong  )  throw (IOExceptionPtr) [pure virtual]
 

Reads a single long int.

Implemented in rovsoft::io::AsciiIStreamer, rovsoft::io::BinaryIStreamer, and rovsoft::io::BinaryLenSegmentIStreamer.

virtual long long rovsoft::io::IStreamer::readLongLong  )  throw (IOExceptionPtr) [pure virtual]
 

Reads a single long long int.

Implemented in rovsoft::io::AsciiIStreamer, rovsoft::io::BinaryIStreamer, and rovsoft::io::BinaryLenSegmentIStreamer.

virtual short rovsoft::io::IStreamer::readShort  )  throw (IOExceptionPtr) [pure virtual]
 

Reads a single short int.

Implemented in rovsoft::io::AsciiIStreamer, rovsoft::io::BinaryIStreamer, and rovsoft::io::BinaryLenSegmentIStreamer.

virtual std::string rovsoft::io::IStreamer::readString int  length  )  throw (IOExceptionPtr) [pure virtual]
 

Reads a string with fix length.

Parameters:
length the number of characters to read.

Implemented in rovsoft::io::AsciiIStreamer, rovsoft::io::BinaryIStreamer, and rovsoft::io::BinaryLenSegmentIStreamer.

virtual std::string rovsoft::io::IStreamer::readString  )  throw (IOExceptionPtr) [pure virtual]
 

Implemented in rovsoft::io::AsciiIStreamer, rovsoft::io::BinaryIStreamer, and rovsoft::io::BinaryLenSegmentIStreamer.

virtual unsigned char rovsoft::io::IStreamer::readUByte  )  throw (IOExceptionPtr) [pure virtual]
 

Reads a single unsigned byte.

Implemented in rovsoft::io::AsciiIStreamer, rovsoft::io::BinaryIStreamer, and rovsoft::io::BinaryLenSegmentIStreamer.

virtual unsigned long rovsoft::io::IStreamer::readULong  )  throw (IOExceptionPtr) [pure virtual]
 

Reads a single unsigned long int.

Implemented in rovsoft::io::AsciiIStreamer, rovsoft::io::BinaryIStreamer, and rovsoft::io::BinaryLenSegmentIStreamer.

virtual unsigned long long rovsoft::io::IStreamer::readULongLong  )  throw (IOExceptionPtr) [pure virtual]
 

Reads a single unsigned long long int.

Implemented in rovsoft::io::AsciiIStreamer, rovsoft::io::BinaryIStreamer, and rovsoft::io::BinaryLenSegmentIStreamer.

virtual unsigned short rovsoft::io::IStreamer::readUShort  )  throw (IOExceptionPtr) [pure virtual]
 

Reads a single unsigned short int.

Implemented in rovsoft::io::AsciiIStreamer, rovsoft::io::BinaryIStreamer, and rovsoft::io::BinaryLenSegmentIStreamer.


The documentation for this class was generated from the following file:
Generated on Tue May 31 14:19:34 2005 for Rovsoft by  doxygen 1.4.3