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

# InBinary Class Reference

Formated reading of binary data to be used in streams. More...

`#include <InStreams.h>`

Inheritance diagram for InBinary:

[legend]
Collaboration diagram for InBinary:

[legend]
List of all members.

## Protected Member Functions
virtual bool | isEof (const PhysicalInStream &stream) const
| The function returns whether the end of stream has been reached.
virtual void | readChar (char &d, PhysicalInStream &stream)
| The function reads a char from the stream.
virtual void | readUChar (unsigned char &d, PhysicalInStream &stream)
| The function reads an unsigned char from the stream.
virtual void | readShort (short &d, PhysicalInStream &stream)
| The function reads a short int from the stream.
virtual void | readUShort (unsigned short &d, PhysicalInStream &stream)
| The function reads an unsigned short int from the stream.
virtual void | readInt (int &d, PhysicalInStream &stream)
| The function reads an int from the stream.
virtual void | readUInt (unsigned int &d, PhysicalInStream &stream)
| The function reads an unsigned int from the stream.
virtual void | readLong (long &d, PhysicalInStream &stream)
| The function reads a long int from the stream.
virtual void | readULong (unsigned long &d, PhysicalInStream &stream)
| The function reads an unsigned long int from the stream.
virtual void | readFloat (float &d, PhysicalInStream &stream)
| The function reads a float from the stream.
virtual void | readDouble (double &d, PhysicalInStream &stream)
| The function reads a double from the stream.
virtual void | readString (char *d, PhysicalInStream &stream)
| The function reads a string from the stream.
virtual void | readEndl (PhysicalInStream &stream)
| The function is intended to read an endl-symbol from the stream.
virtual void | readData (void *p, int size, PhysicalInStream &stream)
| The function reads a number of bytes from a stream.
virtual void | skipData (int size, PhysicalInStream &stream)
| The function skips a number of bytes in the file.

## Detailed Description

Formated reading of binary data to be used in streams.

The physical reading is done by PhysicalInStream derivates.

Definition at line 511 of file InStreams.h.

## Member Function Documentation

virtual bool InBinary::isEof | ( | const PhysicalInStream & | stream | ) | const`[inline, protected, virtual]`

| The function returns whether the end of stream has been reached. Returns: End of stream reached? Implements StreamReader. Definition at line 518 of file InStreams.h. References PhysicalInStream::getEof().

Here is the call graph for this function:

virtual void InBinary::readChar | ( | char & | d,
|  | PhysicalInStream & | stream
| ) | `[inline, protected, virtual]`

  | The function reads a char from the stream. Parameters:
  d | The value that is read.
  stream | A Stream to read from.
Implements StreamReader. Definition at line 525 of file InStreams.h. References PhysicalInStream::readFromStream().

Here is the call graph for this function:

virtual void InBinary::readUChar | ( | unsigned char & | d,
|  | PhysicalInStream & | stream
| ) | `[inline, protected, virtual]`

  | The function reads an unsigned char from the stream. Parameters:
  d | The value that is read.
  stream | A Stream to read from.
Implements StreamReader. Definition at line 533 of file InStreams.h. References PhysicalInStream::readFromStream().

Here is the call graph for this function:

virtual void InBinary::readShort | ( | short & | d,
|  | PhysicalInStream & | stream
| ) | `[inline, protected, virtual]`

  | The function reads a short int from the stream. Parameters:
  d | The value that is read.
  stream | A Stream to read from.
Implements StreamReader. Definition at line 541 of file InStreams.h. References PhysicalInStream::readFromStream().

Here is the call graph for this function:

virtual void InBinary::readUShort | ( | unsigned short & | d,
|  | PhysicalInStream & | stream
| ) | `[inline, protected, virtual]`

  | The function reads an unsigned short int from the stream. Parameters:
  d | The value that is read.
  stream | A Stream to read from.
Implements StreamReader. Definition at line 549 of file InStreams.h. References PhysicalInStream::readFromStream().

Here is the call graph for this function:

virtual void InBinary::readInt | ( | int & | d,
|  | PhysicalInStream & | stream
| ) | `[inline, protected, virtual]`

  | The function reads an int from the stream. Parameters:
  d | The value that is read.
  stream | A Stream to read from.
Implements StreamReader. Definition at line 557 of file InStreams.h. References PhysicalInStream::readFromStream().

Here is the call graph for this function:

virtual void InBinary::readUInt | ( | unsigned int & | d,
|  | PhysicalInStream & | stream
| ) | `[inline, protected, virtual]`

  | The function reads an unsigned int from the stream. Parameters:
  d | The value that is read.
  stream | A Stream to read from.
Implements StreamReader. Definition at line 565 of file InStreams.h. References PhysicalInStream::readFromStream().

Here is the call graph for this function:

virtual void InBinary::readLong | ( | long & | d,
|  | PhysicalInStream & | stream
| ) | `[inline, protected, virtual]`

  | The function reads a long int from the stream. Parameters:
  d | The value that is read.
  stream | A Stream to read from.
Implements StreamReader. Definition at line 573 of file InStreams.h. References PhysicalInStream::readFromStream().

Here is the call graph for this function:

virtual void InBinary::readULong | ( | unsigned long & | d,
|  | PhysicalInStream & | stream
| ) | `[inline, protected, virtual]`

  | The function reads an unsigned long int from the stream. Parameters:
  d | The value that is read.
  stream | A Stream to read from.
Implements StreamReader. Definition at line 581 of file InStreams.h. References PhysicalInStream::readFromStream().

Here is the call graph for this function:

virtual void InBinary::readFloat | ( | float & | d,
|  | PhysicalInStream & | stream
| ) | `[inline, protected, virtual]`

  | The function reads a float from the stream. Parameters:
  d | The value that is read.
  stream | A Stream to read from.
Implements StreamReader. Definition at line 589 of file InStreams.h. References PhysicalInStream::readFromStream().

Here is the call graph for this function:

virtual void InBinary::readDouble | ( | double & | d,
|  | PhysicalInStream & | stream
| ) | `[inline, protected, virtual]`

  | The function reads a double from the stream. Parameters:
  d | The value that is read.
  stream | A Stream to read from.
Implements StreamReader. Definition at line 597 of file InStreams.h. References PhysicalInStream::readFromStream().

Here is the call graph for this function:

virtual void InBinary::readString | ( | char * | d,
|  | PhysicalInStream & | stream
| ) | `[inline, protected, virtual]`

  | The function reads a string from the stream. Parameters:
  d | The value that is read. Note that d must point to a memory area that is large enough to carry the string.
  stream | A Stream to read from.
Implements StreamReader. Definition at line 607 of file InStreams.h. References PhysicalInStream::readFromStream().

Here is the call graph for this function:

virtual void InBinary::readEndl | ( | PhysicalInStream & | stream | ) | `[inline, protected, virtual]`

  | The function is intended to read an endl-symbol from the stream. In fact, the function does nothing. Parameters:
  stream | A Stream to read from.
Implements StreamReader. Definition at line 615 of file InStreams.h.

virtual void InBinary::readData | ( | void * | p,
|  | int | size,
|  | PhysicalInStream & | stream
| ) | `[inline, protected, virtual]`

  | The function reads a number of bytes from a stream. 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 | A Stream to read from.
Implements StreamReader. Definition at line 625 of file InStreams.h. References PhysicalInStream::readFromStream().

Here is the call graph for this function:

virtual void InBinary::skipData | ( | int | size,
|  | PhysicalInStream & | stream
| ) | `[inline, 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 from StreamReader. Definition at line 633 of file InStreams.h. References PhysicalInStream::skipInStream().

Here is the call graph for this function:

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

- Tools/Streams/InStreams.h