Raven Engine v0.1
A modern 3D Game Engine
Loading...
Searching...
No Matches
Reflection

Reflection system. More...

Classes

struct  Raven::ContainedTypeRegistrar< T >
 Base template for recursive contained-type registration. More...
struct  Raven::ContainedTypeRegistrar< std::vector< T > >
 Registers the element type of a std::vector. More...
struct  Raven::ContainedTypeRegistrar< std::array< T, N > >
 Registers the element type of a std::array. More...
struct  Raven::ContainedTypeRegistrar< std::unordered_map< T, N > >
 Registers the key and mapped types of a std::unordered_map. More...
struct  std::hash< Raven::TypeID >
 Hash specialization for Raven::TypeID. More...
class  Raven::TypeRegistry
 Global runtime type registry for Raven Engine. More...
struct  RegisterTypeOnConstruct
 Helper for auto-registration of types on static construction. More...
struct  Raven::TypeData
 Metadata about a type. More...
class  Raven::TypeID
 A unique identifier for a type. More...
struct  Raven::VariableData
 Metadata describing a reflected member variable. More...
class  Raven::VariableID
 Identifier for reflected member variable types. More...

Enumerations

enum class  Raven::TypeCategory : u8 {
  Raven::TypeCategory::Unknown = 0 , Raven::TypeCategory::Bool , Raven::TypeCategory::Int , Raven::TypeCategory::UInt ,
  Raven::TypeCategory::Float , Raven::TypeCategory::Double , Raven::TypeCategory::Vec2 , Raven::TypeCategory::Vec3 ,
  Raven::TypeCategory::Vec4 , Raven::TypeCategory::String , Raven::TypeCategory::Object
}
 Stores the category of a Reflected type. Used for display and conversion between scripting and UI. More...

Functions

template<typename T>
constexpr std::string_view Raven::ReflectionUtils::GetFullTypeName ()
 Retrieve the compiler-generated function signature containing the type name.
template<typename T>
constexpr std::string_view Raven::ReflectionUtils::GetTypeName ()
 Extract a human-readable type name.

Detailed Description

Reflection system.

Enumeration Type Documentation

◆ TypeCategory

enum class Raven::TypeCategory : u8
strong

Stores the category of a Reflected type. Used for display and conversion between scripting and UI.

Enumerator
Unknown 
Bool 
Int 
UInt 
Float 
Double 
Vec2 
Vec3 
Vec4 
String 
Object 

Function Documentation

◆ GetFullTypeName()

template<typename T>
std::string_view Raven::ReflectionUtils::GetFullTypeName ( )
inlineconstexpr

Retrieve the compiler-generated function signature containing the type name.

Returns a compiler-specific string describing the instantiation context of this function. The exact format, spelling, and qualifiers are not standardized and may change between compilers, compiler versions, or build configurations.

Template Parameters
TThe type to retrieve the name for.
Returns
Compiler-specific full type name.
Warning
The returned value is not stable across compiler updates.

◆ GetTypeName()

template<typename T>
std::string_view Raven::ReflectionUtils::GetTypeName ( )
inlineconstexpr

Extract a human-readable type name.

This function derives a readable type name by slicing the compiler-generated signature returned by GetFullTypeName<T>(). It relies on the relative position of a known anchor type (void) to determine prefix and suffix offsets.

This approach assumes:

  • The compiler emits type names in a consistent format
  • The formatting of void matches that of other types
  • The same compiler and flags are used across the entire build
Note
This is a best-effort utility. The resulting name is suitable for debugging, editor tooling, and internal reflection, but not for long-term storage or binary interfaces.
Template Parameters
TThe type to extract the name for.
Returns
Simplified type name as string_view.