Skip to content

EntropyEngine::Core::TypeSystem

Name
EntropyEngine::Core::TypeSystem::detail
Internal implementation details for the reflection system.
Name
structEntropyEngine::Core::TypeSystem::compile_time_type_info
Compile-time type information collector.
structEntropyEngine::Core::TypeSystem::_EntropyTypeRegistrar
Legacy type registrar for backward compatibility.
classEntropyEngine::Core::TypeSystem::TypedHandle
Type-safe handle template that derives from GenericHandle.
classEntropyEngine::Core::TypeSystem::TypeInfo
Runtime type information container with field introspection.
structEntropyEngine::Core::TypeSystem::TypeID
A cross-platform type identifier with stable hashing and comparison.
classEntropyEngine::Core::TypeSystem::GenericHandle
Base class for type-safe handle implementations with generation-based validation.
structEntropyEngine::Core::TypeSystem::FieldInfo
Information about a reflected field in a type.
Name
template <typename T >
const TypeID &
typeIdOf()
Create a TypeID for a given type T.
template <typename T >
TypeID
createTypeId()
template <typename T >
inline const TypeID & typeIdOf()

Create a TypeID for a given type T.

Template Parameters:

  • T The type to create an identifier for

Return: TypeID object uniquely identifying type T @noexcept This function never throws exceptions

This function generates a stable TypeID for any given type using boost::type_index. The resulting TypeID will be identical for the same type across different compilation units and function calls.

Template parameters and typedefs are resolved to their canonical forms:

  • std::string becomes the underlying template instantiation
  • glm::quat becomes glm::qua<float>
  • Template parameters are preserved in the name

Performance characteristics:

  • O(1) hash generation
  • Small string allocation for type name
  • Inlined for zero function call overhead
// Basic types
auto intId = createTypeId<int>();
auto floatId = createTypeId<float>();
// Template types
auto vectorId = createTypeId<std::vector<int>>();
auto quatId = createTypeId<glm::quat>(); // Shows as "glm::qua<float>"
// Custom types
auto customId = createTypeId<MyCustomClass>();
template <typename T >
inline TypeID createTypeId()

Updated on 2026-01-26 at 17:14:35 -0500