Raven Engine v0.1
A modern 3D Game Engine
Loading...
Searching...
No Matches
Raven::VariableData Struct Reference

Metadata describing a reflected member variable. More...

#include <VariableData.h>

Public Member Functions

constexpr VariableData (const VariableID &ID, std::string_view name, u32 offset, u32 size, u32 align, TypeCategory category)
 Construct metadata for a reflected member variable.
constexpr bool operator< (const VariableData &var) const
 Compare member variables by memory offset.

Public Attributes

VariableID ID {}
 Identifier describing the member variable's type.
std::string_view Name {}
 Name of the member variable.
u32 Size {}
 Size of the member variable in bytes.
u32 Align {}
 Alignment requirement in bytes.
u32 Offset {}
 Byte offset within the parent type.
TypeCategory Category = TypeCategory::Unknown
 Category of the type.

Detailed Description

Metadata describing a reflected member variable.

Stores reflection metadata for a single member variable, including its identifier, name, memory layout information, and ordering.

VariableData instances are owned by their parent TypeData and are typically stored sorted by memory offset to preserve declaration order.

Constructor & Destructor Documentation

◆ VariableData()

Raven::VariableData::VariableData ( const VariableID & ID,
std::string_view name,
u32 offset,
u32 size,
u32 align,
TypeCategory category )
inlineexplicitconstexpr

Construct metadata for a reflected member variable.

Parameters
IDUnique identifier describing the member variable's type.
nameName of the member variable as declared in the source type.
offsetByte offset of the member variable within its parent type.
sizeSize of the member variable in bytes.
alignAlignment requirement of the member variable in bytes.
categoryTypeCategory of the Variable.

Member Function Documentation

◆ operator<()

bool Raven::VariableData::operator< ( const VariableData & var) const
inlineconstexpr

Compare member variables by memory offset.

Enables ordering of VariableData instances based on their offset within the parent type. This is primarily used to maintain declaration order.

Parameters
varThe VariableData instance to compare against.
Returns
True if this variable precedes the other in memory.

Member Data Documentation

◆ Align

u32 Raven::VariableData::Align {}

Alignment requirement in bytes.

◆ Category

TypeCategory Raven::VariableData::Category = TypeCategory::Unknown

Category of the type.

◆ ID

VariableID Raven::VariableData::ID {}

Identifier describing the member variable's type.

◆ Name

std::string_view Raven::VariableData::Name {}

Name of the member variable.

◆ Offset

u32 Raven::VariableData::Offset {}

Byte offset within the parent type.

◆ Size

u32 Raven::VariableData::Size {}

Size of the member variable in bytes.


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