#include <InStreams.h>
Inheritance diagram for InMemory:
Public Member Functions | |
InMemory () | |
Default constructor. | |
virtual bool | exists () const |
The function states whether the stream actually exists. | |
virtual bool | getEof () const |
The function states whether the end of the file has been reached. | |
Protected Member Functions | |
void | open (const void *mem, unsigned size=0) |
Opens the stream. | |
virtual void | readFromStream (void *p, int size) |
The function reads a number of bytes from memory. | |
virtual void | skipInStream (int size) |
The function skips a number of bytes. | |
Private Attributes | |
const char * | memory |
Points to the next byte to read from memory. | |
const char * | end |
Points to the end of the memory block. |
Definition at line 693 of file InStreams.h.
|
Default constructor.
Definition at line 701 of file InStreams.h. |
|
The function states whether the stream actually exists.
Reimplemented from PhysicalInStream. Definition at line 707 of file InStreams.h. References memory. |
|
The function states whether the end of the file has been reached. It will only work if the correct size of the memory block was specified during the construction of the stream.
Implements PhysicalInStream. Definition at line 715 of file InStreams.h. |
|
Opens the stream.
Definition at line 727 of file InStreams.h. Referenced by InBinaryMemory::InBinaryMemory(), InConfigMemory::InConfigMemory(), and InTextMemory::InTextMemory(). |
|
The function reads a number of bytes from memory.
Implements PhysicalInStream. Definition at line 140 of file InStreams.cpp. References memory. |
|
The function skips a number of bytes.
Reimplemented from PhysicalInStream. Definition at line 743 of file InStreams.h. References memory. |
|
Points to the next byte to read from memory.
Definition at line 696 of file InStreams.h. Referenced by exists(), getEof(), InMemory(), open(), readFromStream(), and skipInStream(). |
|
Points to the end of the memory block.
Definition at line 696 of file InStreams.h. Referenced by getEof(), InMemory(), and open(). |