#include <gauge3d/files/istream.h>
Inherits GAUGE3D::GObject.
Public Types | |
enum | tSeekType { BEGINNING, CURRENT, END } |
Position to seek relative to. More... | |
Public Methods | |
virtual | ~GRawIStream () |
virtual void | Seek (int pos,int seekType) |
Seek the stream position. More... | |
virtual int | TellPos () |
Get the distance in bytes between the beginning of the stream and the current position. | |
virtual int | Read (void *buffer,int size)=0 |
Attempts to fill the buffer and returns the amount actually read. | |
virtual bool | WaitForInput (tTime timeout=0.0) |
Wait for input to become available. More... | |
virtual bool | InputAvailable () |
Returns true if input is currently available. |
\ingoup files
GRawIStream is the actual source of data read using a GIStream. GIStream itself provides buffering and other services for reading the data more easily. Often, however, it is desireable to read the raw data directory, especially when layering streams (you don't want double buffering).
GRawIStream is the class that should be inherited when creating new sources for stream data. When inheriting from GRawIStream, you do not have to write implementations of all of the functions. For example, if your stream does not support seeking, you do not have to write Seek() or TellPos(). If input is always available for your class, you need not define WaitForInput() or InputAvailable().
|
Position to seek relative to.
|
|
Seek the stream position.
|
|
Wait for input to become available.
|