Kanzi  3.9.5
Kanzi Engine API
kanzi::MemoryParser Class Reference

#include <kanzi/core/util/memory_parser.hpp>

Public Member Functions

void alignToOffset (ptrdiff_t alignBytes)
 Skip to next alignment of given bytes, relative to the beginning of the parsed data. More...
 
 MemoryParser (ConstByteSpan memory)
 Constructor. More...
 
ColorRGBA parseColorRGBA ()
 Parse value from current position in the file. More...
 
ConstByteSpan parseData (size_t size)
 Parse value from current position in the file. More...
 
float parseFloat ()
 Parse value from current position in the file. More...
 
int16_t parseInt16 ()
 Parse value from current position in the file. More...
 
int32_t parseInt32 ()
 Parse value from current position in the file. More...
 
int64_t parseInt64 ()
 Parse value from current position in the file. More...
 
int8_t parseInt8 ()
 Parse value from current position in the file. More...
 
Matrix3x3 parseMatrix3x3 ()
 Parse value from current position in the file. More...
 
Matrix4x4 parseMatrix4x4 ()
 Parse value from current position in the file. More...
 
string_view parseNullTerminatedString ()
 Parse value from current position in the file. More...
 
SRTValue2D parseSRT2D ()
 Parse value from current position in the file. More...
 
SRTValue3D parseSRT3D ()
 Parse value from current position in the file. More...
 
uint16_t parseUint16 ()
 Parse value from current position in the file. More...
 
uint32_t parseUint32 ()
 Parse value from current position in the file. More...
 
uint64_t parseUint64 ()
 Parse value from current position in the file. More...
 
uint8_t parseUint8 ()
 Parse value from current position in the file. More...
 
Vector2 parseVector2 ()
 Parse value from current position in the file. More...
 
Vector3 parseVector3 ()
 Parse value from current position in the file. More...
 
Vector4 parseVector4 ()
 Parse value from current position in the file. More...
 
void skip (size_t sizeBytes)
 Skip bytes from current location in the file. More...
 

Constructor & Destructor Documentation

◆ MemoryParser()

kanzi::MemoryParser::MemoryParser ( ConstByteSpan  memory)
inlineexplicit

Constructor.

Parameters
memorySpan representing the data to be parsed.

Member Function Documentation

◆ parseUint64()

uint64_t kanzi::MemoryParser::parseUint64 ( )
inline

Parse value from current position in the file.

Returns
64-bit unsigned integer value.

◆ parseInt64()

int64_t kanzi::MemoryParser::parseInt64 ( )
inline

Parse value from current position in the file.

Returns
64-bit unsigned integer value.

◆ parseUint32()

uint32_t kanzi::MemoryParser::parseUint32 ( )
inline

Parse value from current position in the file.

Returns
32-bit unsigned integer value.

◆ parseInt32()

int32_t kanzi::MemoryParser::parseInt32 ( )
inline

Parse value from current position in the file.

Returns
32-bit signed integer value.

◆ parseUint16()

uint16_t kanzi::MemoryParser::parseUint16 ( )
inline

Parse value from current position in the file.

Returns
16-bit unsigned integer value.

◆ parseInt16()

int16_t kanzi::MemoryParser::parseInt16 ( )
inline

Parse value from current position in the file.

Returns
16-bit integer value.

◆ parseUint8()

uint8_t kanzi::MemoryParser::parseUint8 ( )
inline

Parse value from current position in the file.

Returns
8-bit unsigned integer value.

◆ parseInt8()

int8_t kanzi::MemoryParser::parseInt8 ( )
inline

Parse value from current position in the file.

Returns
8-bit integer value.

◆ parseFloat()

float kanzi::MemoryParser::parseFloat ( )
inline

Parse value from current position in the file.

Returns
32-bit floating point value.

◆ parseColorRGBA()

ColorRGBA kanzi::MemoryParser::parseColorRGBA ( )
inline

Parse value from current position in the file.

Returns
Boolean value.

◆ parseVector2()

Vector2 kanzi::MemoryParser::parseVector2 ( )
inline

Parse value from current position in the file.

Returns
2-component floating point vector value.

◆ parseVector3()

Vector3 kanzi::MemoryParser::parseVector3 ( )
inline

Parse value from current position in the file.

Returns
3-component floating point vector value.

◆ parseVector4()

Vector4 kanzi::MemoryParser::parseVector4 ( )
inline

Parse value from current position in the file.

Returns
4-component floating point vector value.

◆ parseMatrix3x3()

Matrix3x3 kanzi::MemoryParser::parseMatrix3x3 ( )
inline

Parse value from current position in the file.

Returns
3x3 floating point matrix value.

◆ parseMatrix4x4()

Matrix4x4 kanzi::MemoryParser::parseMatrix4x4 ( )
inline

Parse value from current position in the file.

Returns
4x4 floating point matrix value.

◆ parseSRT2D()

SRTValue2D kanzi::MemoryParser::parseSRT2D ( )
inline

Parse value from current position in the file.

Returns
2D SRT value.

◆ parseSRT3D()

SRTValue3D kanzi::MemoryParser::parseSRT3D ( )
inline

Parse value from current position in the file.

Returns
3D SRT value.

◆ parseNullTerminatedString()

string_view kanzi::MemoryParser::parseNullTerminatedString ( )
inline

Parse value from current position in the file.

Returns
View into string value.

◆ parseData()

ConstByteSpan kanzi::MemoryParser::parseData ( size_t  size)
inline

Parse value from current position in the file.

Returns
Byte span.

◆ alignToOffset()

void kanzi::MemoryParser::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
alignBytesAlignment to skip to.

◆ skip()

void kanzi::MemoryParser::skip ( size_t  sizeBytes)
inline

Skip bytes from current location in the file.

Parameters
sizeBytesBytes to skip.

The documentation for this class was generated from the following file: