Kanzi  3.9.7
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

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

Constructor.

Parameters
memorySpan representing the data to be parsed.

Member Function Documentation

uint64_t kanzi::MemoryParser::parseUint64 ( )
inline

Parse value from current position in the file.

Returns
64-bit unsigned integer value.
int64_t kanzi::MemoryParser::parseInt64 ( )
inline

Parse value from current position in the file.

Returns
64-bit unsigned integer value.
uint32_t kanzi::MemoryParser::parseUint32 ( )
inline

Parse value from current position in the file.

Returns
32-bit unsigned integer value.
int32_t kanzi::MemoryParser::parseInt32 ( )
inline

Parse value from current position in the file.

Returns
32-bit signed integer value.
uint16_t kanzi::MemoryParser::parseUint16 ( )
inline

Parse value from current position in the file.

Returns
16-bit unsigned integer value.
int16_t kanzi::MemoryParser::parseInt16 ( )
inline

Parse value from current position in the file.

Returns
16-bit integer value.
uint8_t kanzi::MemoryParser::parseUint8 ( )
inline

Parse value from current position in the file.

Returns
8-bit unsigned integer value.
int8_t kanzi::MemoryParser::parseInt8 ( )
inline

Parse value from current position in the file.

Returns
8-bit integer value.
float kanzi::MemoryParser::parseFloat ( )
inline

Parse value from current position in the file.

Returns
32-bit floating point value.
ColorRGBA kanzi::MemoryParser::parseColorRGBA ( )
inline

Parse value from current position in the file.

Returns
Boolean value.
Vector2 kanzi::MemoryParser::parseVector2 ( )
inline

Parse value from current position in the file.

Returns
2-component floating point vector value.
Vector3 kanzi::MemoryParser::parseVector3 ( )
inline

Parse value from current position in the file.

Returns
3-component floating point vector value.
Vector4 kanzi::MemoryParser::parseVector4 ( )
inline

Parse value from current position in the file.

Returns
4-component floating point vector value.
Matrix3x3 kanzi::MemoryParser::parseMatrix3x3 ( )
inline

Parse value from current position in the file.

Returns
3x3 floating point matrix value.
Matrix4x4 kanzi::MemoryParser::parseMatrix4x4 ( )
inline

Parse value from current position in the file.

Returns
4x4 floating point matrix value.
SRTValue2D kanzi::MemoryParser::parseSRT2D ( )
inline

Parse value from current position in the file.

Returns
2D SRT value.
SRTValue3D kanzi::MemoryParser::parseSRT3D ( )
inline

Parse value from current position in the file.

Returns
3D SRT value.
string_view kanzi::MemoryParser::parseNullTerminatedString ( )
inline

Parse value from current position in the file.

Returns
View into string value.
ConstByteSpan kanzi::MemoryParser::parseData ( size_t  size)
inline

Parse value from current position in the file.

Returns
Byte span.
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.
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: