Memory data stream.
More...
#include <gelDataStream.h>
List of all members.
Public Member Functions |
| | GelMemoryStream () |
| | Default constructor.
|
| | GelMemoryStream (void *bdata, long bsize) |
| | Convenience constructor.
|
| | ~GelMemoryStream () |
| | Destructor.
|
| void | deleteOnClose (bool del) |
| | Sets whether or not the buffer should be deleted when the stream is closed.
|
| bool | open (void *bdata, long bsize) |
| | Opens a buffer stream.
|
| long | read (void *bdata, long bcount) |
| | Reads data from the stream.
|
| long | write (void *bdata, long bcount) |
| | Writes data to the stream.
|
| long | getSize () const |
| | Gets the size of the stream.
|
| long | tell () const |
| | Gets the current value of the stream's position indicator.
|
| bool | seek (long offset, DataSeek origin) |
| | Sets the position of the stream's position indicator.
|
| bool | atEnd () const |
| | Checks if the end of the stream has been reached.
|
Detailed Description
Constructor & Destructor Documentation
| gel::GelMemoryStream::GelMemoryStream |
( |
| ) |
[inline] |
| gel::GelMemoryStream::GelMemoryStream |
( |
void * |
bdata, |
|
|
long |
bsize |
|
) |
| |
Convenience constructor.
Opens a buffer stream.
- Parameters:
-
| bdata | : The stream to open. |
| bsize | : The size of the stream. |
| gel::GelMemoryStream::~GelMemoryStream |
( |
| ) |
|
Member Function Documentation
| void gel::GelMemoryStream::deleteOnClose |
( |
bool |
del | ) |
[inline] |
Sets whether or not the buffer should be deleted when the stream is closed.
By default, the buffer is not deleted.
- Parameters:
-
| del | : True to delete the buffer, else false. |
| bool gel::GelMemoryStream::open |
( |
void * |
bdata, |
|
|
long |
bsize |
|
) |
| |
Opens a buffer stream.
- Parameters:
-
| bdata | : The stream to open. |
| bsize | : The size of the stream. |
- Returns:
- True if successful, else false.
| long gel::GelMemoryStream::read |
( |
void * |
bdata, |
|
|
long |
bcount |
|
) |
| |
Reads data from the stream.
- Parameters:
-
| bdata | : The array to place the read data into. |
| bcount | : The number of bytes to read. |
- Returns:
- The number of bytes read.
| long gel::GelMemoryStream::write |
( |
void * |
bdata, |
|
|
long |
bcount |
|
) |
| |
Writes data to the stream.
- Parameters:
-
| bdata | : The array of data to write. |
| bcount | : The number of bytes to write. |
- Returns:
- The number of bytes written.
| long gel::GelMemoryStream::getSize |
( |
| ) |
const [inline] |
Gets the size of the stream.
- Returns:
- The size of the stream.
| long gel::GelMemoryStream::tell |
( |
| ) |
const [inline] |
Gets the current value of the stream's position indicator.
- Returns:
- The current value of the stream's position indicator.
| bool gel::GelMemoryStream::seek |
( |
long |
offset, |
|
|
DataSeek |
origin |
|
) |
| |
Sets the position of the stream's position indicator.
- Parameters:
-
| offset | : The new position relative to origin |
| origin | : The reference position to add offset to. |
- Returns:
- True if successful, else false.
| bool gel::GelMemoryStream::atEnd |
( |
| ) |
const |
Checks if the end of the stream has been reached.
- Returns:
- True if the end of the stream has been reached, else false.
The documentation for this class was generated from the following file: