HOME | DOWNLOAD | DOCS | DEVELOPMENT | LICENSE | CREDITS |
Abstract data stream. More...
#include <iDataStream.h>
Public Member Functions | |
iDataStream () | |
Constructor. | |
virtual | ~iDataStream () |
Destructor. | |
virtual bool | close ()=0 |
Closes the stream. | |
virtual long | read (void *data, long size, long count)=0 |
Reads data from the stream. | |
virtual long | write (const void *data, long size, long count)=0 |
Writes data to the stream. | |
virtual int | getc ()=0 |
Reads a character from the stream. | |
virtual int | putc (int chr)=0 |
Writes a character to the stream. | |
virtual bool | flush ()=0 |
Flushes the stream. | |
virtual long | size () const =0 |
Returns the size of the stream. | |
virtual long | tell () const =0 |
Returns the current value of the stream's position indicator. | |
virtual bool | seek (long offset, iDataSeek origin)=0 |
Sets the position of the stream's position indicator. | |
virtual bool | atEnd () const =0 |
Checks if the end of the stream has been reached. |
Abstract data stream.
imagen::iDataStream::iDataStream | ( | ) | [inline] |
Constructor.
virtual imagen::iDataStream::~iDataStream | ( | ) | [inline, virtual] |
Destructor.
virtual bool imagen::iDataStream::close | ( | ) | [pure virtual] |
Closes the stream.
Implemented in imagen::iMemoryStream, and imagen::iFileStream.
virtual long imagen::iDataStream::read | ( | void * | data, |
long | size, | ||
long | count | ||
) | [pure virtual] |
Reads data from the stream.
data | : The array to place the read data into. |
size | : The size in bytes of each element to read. |
count | : The number of elements to read. |
Implemented in imagen::iMemoryStream, and imagen::iFileStream.
virtual long imagen::iDataStream::write | ( | const void * | data, |
long | size, | ||
long | count | ||
) | [pure virtual] |
Writes data to the stream.
data | : The array of data to write. |
size | : The size in bytes of each element to write. |
count | : The number of elements to write. |
Implemented in imagen::iMemoryStream, and imagen::iFileStream.
virtual int imagen::iDataStream::getc | ( | ) | [pure virtual] |
Reads a character from the stream.
Implemented in imagen::iMemoryStream, and imagen::iFileStream.
virtual int imagen::iDataStream::putc | ( | int | chr | ) | [pure virtual] |
Writes a character to the stream.
Implemented in imagen::iMemoryStream, and imagen::iFileStream.
virtual bool imagen::iDataStream::flush | ( | ) | [pure virtual] |
Flushes the stream.
Implemented in imagen::iMemoryStream, and imagen::iFileStream.
virtual long imagen::iDataStream::size | ( | ) | const [pure virtual] |
Returns the size of the stream.
Implemented in imagen::iMemoryStream, and imagen::iFileStream.
virtual long imagen::iDataStream::tell | ( | ) | const [pure virtual] |
Returns the current value of the stream's position indicator.
Implemented in imagen::iMemoryStream, and imagen::iFileStream.
virtual bool imagen::iDataStream::seek | ( | long | offset, |
iDataSeek | origin | ||
) | [pure virtual] |
Sets the position of the stream's position indicator.
offset | : The new position relative to origin |
origin | : The reference position to add offset to. |
Implemented in imagen::iMemoryStream, and imagen::iFileStream.
virtual bool imagen::iDataStream::atEnd | ( | ) | const [pure virtual] |
Checks if the end of the stream has been reached.
Implemented in imagen::iMemoryStream, and imagen::iFileStream.
API Documentation by Mark D. Procarione | Generated by |