#include <cascade/util/CascadeMemoryStream.h>
Inheritance diagram for CascadeMemoryStream:
Public Member Functions | |
CascadeMemoryStream () | |
CascadeMemoryStream (void *pMem, u32 nBytes) | |
virtual | ~CascadeMemoryStream () |
virtual bool | AttachMemory (void *pMem, u32 nBytes) |
virtual u64 | GetSize () |
virtual u64 | GetPosition () |
virtual bool | SeekToPosition (u64 nPosition) |
virtual u32 | ReadBytes (u32 nBytes, void *pBuff) |
CascadeMemoryStream allows streams to be read from memory. The main purpose of CascadeMemoryStream is allow you to use memory when a CascadeStream object is required.
|
default constructor This constructor is light weight. |
|
parameterized constructor This constructor attaches memory to the stream when constructed.
|
|
the destructor This destructor is light weight. |
|
attaches existing memory for reading as a stream AttachMemory() attaches existing memory to the CascadeMemoryStream object, allowing the memory to be used as a stream source wherever a CascadeStream object is required.
|
|
returns the current position in the stream Returns the current position in the stream.
Implements CascadeStream. |
|
returns the size of the stream Returns number of total bytes in the stream. The size doesn't change as bytes are read or the position is seeked to.
Implements CascadeStream. |
|
reads bytes from the stream Reads bytes from the stream.
Implements CascadeStream. |
|
seeks to a position in the stream SeekToPositions seeks to a byte position in the stream.
Implements CascadeStream. |