Specifies a data pack that can only be read.
More...
#include <public/IDataPack.h>
|
virtual void | Reset () const =0 |
| Resets the position in the data stream to the beginning.
|
|
virtual size_t | GetPosition () const =0 |
| Retrieves the current stream position. More...
|
|
virtual bool | SetPosition (size_t pos) const =0 |
| Sets the current stream position. More...
|
|
virtual cell_t | ReadCell () const =0 |
| Reads one cell from the data stream. More...
|
|
virtual float | ReadFloat () const =0 |
| Reads one float from the data stream. More...
|
|
virtual bool | IsReadable (size_t bytes) const =0 |
| Returns whether or not a specified number of bytes from the current stream position to the end can be read. More...
|
|
virtual const char * | ReadString (size_t *len) const =0 |
| Reads a string from the data stream. More...
|
|
virtual void * | GetMemory () const =0 |
| Reads the current position as a generic address. More...
|
|
virtual void * | ReadMemory (size_t *size) const =0 |
| Reads the current position as a generic data type. More...
|
|
virtual cell_t | ReadFunction () const =0 |
| Reads a function pointer from the data stream. More...
|
|
Specifies a data pack that can only be read.
virtual void* SourceMod::IDataReader::GetMemory |
( |
| ) |
const |
|
pure virtual |
Reads the current position as a generic address.
- Returns
- Pointer to the memory.
virtual size_t SourceMod::IDataReader::GetPosition |
( |
| ) |
const |
|
pure virtual |
Retrieves the current stream position.
- Returns
- Index into the stream.
virtual bool SourceMod::IDataReader::IsReadable |
( |
size_t |
bytes | ) |
const |
|
pure virtual |
Returns whether or not a specified number of bytes from the current stream position to the end can be read.
- Parameters
-
bytes | Number of bytes to simulate reading. |
- Returns
- True if can be read, false otherwise.
virtual cell_t SourceMod::IDataReader::ReadCell |
( |
| ) |
const |
|
pure virtual |
Reads one cell from the data stream.
- Returns
- A cell read from the current position.
virtual float SourceMod::IDataReader::ReadFloat |
( |
| ) |
const |
|
pure virtual |
Reads one float from the data stream.
- Returns
- A float read from the current position.
virtual cell_t SourceMod::IDataReader::ReadFunction |
( |
| ) |
const |
|
pure virtual |
Reads a function pointer from the data stream.
- Returns
- A function pointer read from the current position.
virtual void* SourceMod::IDataReader::ReadMemory |
( |
size_t * |
size | ) |
const |
|
pure virtual |
Reads the current position as a generic data type.
- Parameters
-
size | Optional pointer to store the size of the data type. |
- Returns
- Pointer to the data, or NULL if out of bounds.
virtual const char* SourceMod::IDataReader::ReadString |
( |
size_t * |
len | ) |
const |
|
pure virtual |
Reads a string from the data stream.
- Parameters
-
len | Optional pointer to store the string length. |
- Returns
- Pointer to the string, or NULL if out of bounds.
virtual bool SourceMod::IDataReader::SetPosition |
( |
size_t |
pos | ) |
const |
|
pure virtual |
Sets the current stream position.
- Parameters
-
pos | Index to set the stream at. |
- Returns
- True if succeeded, false if out of bounds.
The documentation for this class was generated from the following file: