#include <kanzi/core/util/memory_writer.hpp>
|
void | alignToOffset (ptrdiff_t alignBytes) |
| Skip to next alignment of given bytes, relative to the beginning of the parsed data. More...
|
|
void | copy (ConstByteSpan source) |
| Wrtie the data to the current position in the memory buffer. More...
|
|
size_t | getCapacity () const |
| Gets the current capacity of the memory buffer. More...
|
|
size_t | getSize () const |
| Gets the current size of the written memory. More...
|
|
| MemoryWriter (ByteSpan memory) |
| Constructor. More...
|
|
void | skip (size_t sizeBytes) |
| Skip bytes from current location in the memory buffer. More...
|
|
void | write (uint64_t value) |
| Write a 64-bit unsigned integer value to the current position in the memory buffer. More...
|
|
void | write (int64_t value) |
| Write a 8-bit integer value to the current position in the memory buffer. More...
|
|
void | write (uint32_t value) |
| Write a 32-bit unsigned integer value to the current position in the memory buffer. More...
|
|
void | write (int32_t value) |
| Write a 32-bit integer value to the current position in the memory buffer. More...
|
|
void | write (uint16_t value) |
| Write a 16-bit unsigned integer value to the current position in the memory buffer. More...
|
|
void | write (int16_t value) |
| Write a 16-bit integer value to the current position in the memory buffer. More...
|
|
void | write (uint8_t value) |
| Write a 8-bit unsigned integer value to the current position in the memory buffer. More...
|
|
void | write (int8_t value) |
| Write a 8-bit integer value to the current position in the memory buffer. More...
|
|
void | write (float value) |
| Write a 32-bit floating point value to the current position in the memory buffer. More...
|
|
kanzi::MemoryWriter::MemoryWriter |
( |
ByteSpan |
memory | ) |
|
|
inlineexplicit |
Constructor.
- Parameters
-
memory | Span representing the location of the writable memory buffer. |
void kanzi::MemoryWriter::write |
( |
uint64_t |
value | ) |
|
|
inline |
Write a 64-bit unsigned integer value to the current position in the memory buffer.
- Parameters
-
value | A 64-bit unsigned integer value. |
void kanzi::MemoryWriter::write |
( |
int64_t |
value | ) |
|
|
inline |
Write a 8-bit integer value to the current position in the memory buffer.
- Parameters
-
value | A 8-bit integer value. |
void kanzi::MemoryWriter::write |
( |
uint32_t |
value | ) |
|
|
inline |
Write a 32-bit unsigned integer value to the current position in the memory buffer.
- Parameters
-
value | A 32-bit unsigned integer value. |
void kanzi::MemoryWriter::write |
( |
int32_t |
value | ) |
|
|
inline |
Write a 32-bit integer value to the current position in the memory buffer.
- Parameters
-
value | A 32-bit integer value. |
void kanzi::MemoryWriter::write |
( |
uint16_t |
value | ) |
|
|
inline |
Write a 16-bit unsigned integer value to the current position in the memory buffer.
- Parameters
-
value | A 16-bit unsigned integer value. |
void kanzi::MemoryWriter::write |
( |
int16_t |
value | ) |
|
|
inline |
Write a 16-bit integer value to the current position in the memory buffer.
- Parameters
-
value | A 16-bit integer value. |
void kanzi::MemoryWriter::write |
( |
uint8_t |
value | ) |
|
|
inline |
Write a 8-bit unsigned integer value to the current position in the memory buffer.
- Parameters
-
value | A 8-bit unsigned integer value. |
void kanzi::MemoryWriter::write |
( |
int8_t |
value | ) |
|
|
inline |
Write a 8-bit integer value to the current position in the memory buffer.
- Parameters
-
value | A 8-bit integer value. |
void kanzi::MemoryWriter::write |
( |
float |
value | ) |
|
|
inline |
Write a 32-bit floating point value to the current position in the memory buffer.
- Parameters
-
value | A 32-bit floating point value. |
Wrtie the data to the current position in the memory buffer.
- Parameters
-
void kanzi::MemoryWriter::alignToOffset |
( |
ptrdiff_t |
alignBytes | ) |
|
|
inline |
Skip to next alignment of given bytes, relative to the beginning of the parsed data.
If alignment is already correct, the position is not moved.
- Parameters
-
alignBytes | Alignment to skip to. |
void kanzi::MemoryWriter::skip |
( |
size_t |
sizeBytes | ) |
|
|
inline |
Skip bytes from current location in the memory buffer.
- Parameters
-
size_t kanzi::MemoryWriter::getSize |
( |
| ) |
const |
|
inline |
Gets the current size of the written memory.
- Returns
- Size in bytes
size_t kanzi::MemoryWriter::getCapacity |
( |
| ) |
const |
|
inline |
Gets the current capacity of the memory buffer.
- Returns
- Capacity in bytes
The documentation for this class was generated from the following file: