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

StreamReader Class Reference

Generic class for formated reading of data to be used in streams. More...

#include <InStreams.h>

Inheritance diagram for StreamReader:

Inheritance graph
[legend]
List of all members.

Protected Member Functions

virtual void readChar (char &d, PhysicalInStream &stream)=0
 reads a character from a stream

virtual void readUChar (unsigned char &d, PhysicalInStream &stream)=0
 reads a unsigned character from a stream

virtual void readShort (short &d, PhysicalInStream &stream)=0
 reads a short from a stream

virtual void readUShort (unsigned short &d, PhysicalInStream &stream)=0
 reads a unsigned short from a stream

virtual void readInt (int &d, PhysicalInStream &stream)=0
 reads a int from a stream

virtual void readUInt (unsigned int &d, PhysicalInStream &stream)=0
 reads a unsigned int from a stream

virtual void readLong (long &d, PhysicalInStream &stream)=0
 reads a long from a stream

virtual void readULong (unsigned long &d, PhysicalInStream &stream)=0
 reads a unsigned long from a stream

virtual void readFloat (float &d, PhysicalInStream &stream)=0
 reads a float from a stream

virtual void readDouble (double &d, PhysicalInStream &stream)=0
 reads a double from a stream

virtual void readString (char *d, PhysicalInStream &stream)=0
 reads a string from a stream

virtual void readEndl (PhysicalInStream &stream)=0
 reads the 'end of line' from a stream

virtual void readData (void *p, int size, PhysicalInStream &stream)=0
 The function reads a number of bytes from the file.

virtual void skipData (int size, PhysicalInStream &stream)
 The function skips a number of bytes in the file.

virtual bool isEof (const PhysicalInStream &stream) const=0
 The function states whether the end of the stream has been reached.


Detailed Description

Generic class for formated reading of data to be used in streams.

The physical reading is then done by PhysicalOutStream derivates.

Definition at line 61 of file InStreams.h.


Member Function Documentation

virtual void StreamReader::readChar (  char &  d,
PhysicalInStream &  stream
)  [protected, pure virtual]
 

reads a character from a stream

Parameters:
d the data to read from the stream
stream the stream to read from

Implemented in InText, and InBinary.

virtual void StreamReader::readUChar (  unsigned char &  d,
PhysicalInStream &  stream
)  [protected, pure virtual]
 

reads a unsigned character from a stream

Parameters:
d the data to read from the stream
stream the stream to read from

Implemented in InText, and InBinary.

virtual void StreamReader::readShort (  short &  d,
PhysicalInStream &  stream
)  [protected, pure virtual]
 

reads a short from a stream

Parameters:
d the data to read from the stream
stream the stream to read from

Implemented in InText, and InBinary.

virtual void StreamReader::readUShort (  unsigned short &  d,
PhysicalInStream &  stream
)  [protected, pure virtual]
 

reads a unsigned short from a stream

Parameters:
d the data to read from the stream
stream the stream to read from

Implemented in InText, and InBinary.

virtual void StreamReader::readInt (  int &  d,
PhysicalInStream &  stream
)  [protected, pure virtual]
 

reads a int from a stream

Parameters:
d the data to read from the stream
stream the stream to read from

Implemented in InText, and InBinary.

virtual void StreamReader::readUInt (  unsigned int &  d,
PhysicalInStream &  stream
)  [protected, pure virtual]
 

reads a unsigned int from a stream

Parameters:
d the data to read from the stream
stream the stream to read from

Implemented in InText, and InBinary.

virtual void StreamReader::readLong (  long &  d,
PhysicalInStream &  stream
)  [protected, pure virtual]
 

reads a long from a stream

Parameters:
d the data to read from the stream
stream the stream to read from

Implemented in InText, and InBinary.

virtual void StreamReader::readULong (  unsigned long &  d,
PhysicalInStream &  stream
)  [protected, pure virtual]
 

reads a unsigned long from a stream

Parameters:
d the data to read from the stream
stream the stream to read from

Implemented in InText, and InBinary.

virtual void StreamReader::readFloat (  float &  d,
PhysicalInStream &  stream
)  [protected, pure virtual]
 

reads a float from a stream

Parameters:
d the data to read from the stream
stream the stream to read from

Implemented in InText, and InBinary.

virtual void StreamReader::readDouble (  double &  d,
PhysicalInStream &  stream
)  [protected, pure virtual]
 

reads a double from a stream

Parameters:
d the data to read from the stream
stream the stream to read from

Implemented in InText, and InBinary.

virtual void StreamReader::readString (  char *  d,
PhysicalInStream &  stream
)  [protected, pure virtual]
 

reads a string from a stream

Parameters:
d the data to read from the stream
stream the stream to read from

Implemented in InText, and InBinary.

virtual void StreamReader::readEndl (  PhysicalInStream &  stream  )  [protected, pure virtual]
 

reads the 'end of line' from a stream

Parameters:
stream the stream to read from

Implemented in InText, and InBinary.

virtual void StreamReader::readData (  void *  p,
int  size,
PhysicalInStream &  stream
)  [protected, pure virtual]
 

The function reads a number of bytes from the file.

Parameters:
p The address the data is written to. Note that p must point to a memory area that is at least "size" bytes large.
size The number of bytes to be read.
stream The stream to read from.

Implemented in InText, and InBinary.

Referenced by skipData().

void StreamReader::skipData (  int  size,
PhysicalInStream &  stream
)  [protected, virtual]
 

The function skips a number of bytes in the file.

Parameters:
size The number of bytes to be skipped.
stream The stream to read from.

Reimplemented in InBinary.

Definition at line 14 of file InStreams.cpp.

References readData().

Here is the call graph for this function:

virtual bool StreamReader::isEof (  const PhysicalInStream &  stream  )  const [protected, pure virtual]
 

The function states whether the end of the stream has been reached.

Parameters:
stream The stream to be tested
Returns:
End of stream reached?

Implemented in InText, and InBinary.


The documentation for this class was generated from the following files:
Generated on Thu Sep 23 20:11:56 2004 for GT2004 by doxygen 1.3.6