Struct VarOffsetStruct

Nested Relationships

Nested Types

Struct Documentation

struct VarOffsetStruct

This struct holds a map of how memory for a compact representation of some unknown vars needs to look

Public Functions

inline explicit VarOffsetStruct(const VariableMap &vmap)

Construct a new VarOffsetStruct from a map of variable metadata

Parameters:

vmap – Map of variable metadata to construct for

inline explicit VarOffsetStruct(const VarOffsetStruct &other)

Copy constructor

Parameters:

other – Item to be copied

inline ~VarOffsetStruct()

Public Members

std::unordered_map<std::string, OffsetLen> vars
const size_t totalSize
char *const default_data
struct OffsetLen

Tuple containing the offset, length and type index of a variable

Public Functions

inline OffsetLen(const ptrdiff_t &_offset, const size_t _len, const std::type_index _type)

Constructor

Parameters:
  • _offset – Offset of the variable within the buffer

  • _len – Length of the variables data within the buffer

  • _type – Type of the variable’s base type (does not account for whether it’s an array)

inline bool operator==(const OffsetLen &other) const

Equality operator, returns true if all 3 components match

Public Members

const ptrdiff_t offset
const size_t len
const std::type_index type