#include <public/IDataPack.h>
Inherits SourceMod::IDataReader.
Inheritance diagram for SourceMod::IDataPack:
Public Member Functions | |
| virtual void | ResetSize ()=0 |
| Resets the used size of the stream back to zero. | |
| virtual void | PackCell (cell_t cell)=0 |
| Packs one cell into the data stream. | |
| virtual void | PackFloat (float val)=0 |
| Packs one float into the data stream. | |
| virtual void | PackString (const char *string)=0 |
| Packs one string into the data stream. The length is recorded as well for buffer overrun protection. | |
| virtual size_t | CreateMemory (size_t size, void **addr)=0 |
| Creates a generic block of memory in the stream. | |
Definition at line 121 of file IDataPack.h.
| virtual void SourceMod::IDataPack::PackCell | ( | cell_t | cell | ) | [pure virtual] |
Packs one cell into the data stream.
| cell | Cell value to write. |
| virtual void SourceMod::IDataPack::PackFloat | ( | float | val | ) | [pure virtual] |
Packs one float into the data stream.
| val | Float value to write. |
| virtual void SourceMod::IDataPack::PackString | ( | const char * | string | ) | [pure virtual] |
Packs one string into the data stream. The length is recorded as well for buffer overrun protection.
| string | String to write. |
| virtual size_t SourceMod::IDataPack::CreateMemory | ( | size_t | size, | |
| void ** | addr | |||
| ) | [pure virtual] |
Creates a generic block of memory in the stream.
Note that the pointer it returns can be invalidated on further writing, since the stream size may grow. You may need to double back and fetch the pointer again.
| size | Size of the memory to create in the stream. | |
| addr | Optional pointer to store the relocated memory address. |
1.5.1