|
|
void | reset () |
| |
|
GAIA_NODISCARD uint32_t | bytes () const |
| | Returns the number of bytes written in the buffer.
|
| |
|
GAIA_NODISCARD bool | empty () const |
| | Returns true if there is no data written in the buffer.
|
| |
|
GAIA_NODISCARD const auto * | data () const |
| | Returns the pointer to the data in the buffer.
|
| |
| void | reserve (uint32_t size) |
| | Makes sure there is enough capacity in our data container to hold another size bytes of data.
|
| |
| void | resize (uint32_t size) |
| | Resizes the internal buffer to size bytes.
|
| |
| void | seek (uint32_t pos) |
| | Changes the current position in the buffer.
|
| |
| void | skip (uint32_t size) |
| | Advances size bytes from the current buffer position.
|
| |
|
GAIA_NODISCARD uint32_t | tell () const |
| | Returns the current position in the buffer.
|
| |
| template<typename T > |
| void | save (T &&value) |
| | Writes value to the buffer.
|
| |
| void | save_raw (const void *pSrc, uint32_t size, ser::serialization_type_id id) |
| | Writes size bytes of data starting at the address pSrc to the buffer.
|
| |
| template<typename T > |
| void | load (T &value) |
| | Loads value from the buffer.
|
| |
| void | load_raw (void *pDst, uint32_t size, ser::serialization_type_id id) |
| | Loads size bytes of data from the buffer and writes it to the address pDst.
|
| |
|
|
DataContainer | m_data |
| | Buffer holding raw data.
|
| |
|
uint32_t | m_dataPos = 0 |
| | Current position in the buffer.
|
| |
|
|
static constexpr uint32_t | CapacityIncreaseSize = SerializationBufferCapacityIncreaseSize |
| |
◆ load()
template<typename DataContainer >
template<typename T >
Loads value from the buffer.
- Parameters
-
◆ load_raw()
template<typename DataContainer >
Loads size bytes of data from the buffer and writes it to the address pDst.
- Parameters
-
| [out] | pDst | Pointer to where deserialized data is written |
| size | Size of serialized data in bytes |
| id | Type of serialized data |
◆ reserve()
template<typename DataContainer >
Makes sure there is enough capacity in our data container to hold another size bytes of data.
- Parameters
-
| size | Minimum number of free bytes at the end of the buffer. |
◆ resize()
template<typename DataContainer >
Resizes the internal buffer to size bytes.
- Parameters
-
| size | Position in the buffer to move to. |
◆ save()
template<typename DataContainer >
template<typename T >
Writes value to the buffer.
- Parameters
-
◆ save_raw()
template<typename DataContainer >
Writes size bytes of data starting at the address pSrc to the buffer.
- Parameters
-
| pSrc | Pointer to serialized data |
| size | Size of serialized data in bytes |
| id | Type of serialized data |
◆ seek()
template<typename DataContainer >
Changes the current position in the buffer.
- Parameters
-
| pos | Position in the buffer to move to. |
◆ skip()
template<typename DataContainer >
Advances size bytes from the current buffer position.
- Parameters
-
| size | Number of bytes to skip |
The documentation for this class was generated from the following file: