type_registry.h
| File Path | engine/include/conjure/core/reflect/type_registry.h |
| API ↗ | Reflection |
The type registry.
Classes
| File | Description |
|---|---|
reflect::type_registry |
Registered struct and enum descriptions with stable addresses and lock-free lookup. |
Forward Declarations
reflect::type_registry::state
Functions
Public
reflect::detail::register_described_enum
reflect::detail::register_described_enumRegisters a macro-built enumeration description in registry(); logs an ERROR and returns nullptr when the registry rejects it.
reflect::detail::register_described_type
reflect::detail::register_described_typeRegisters a macro-built struct description in registry(); logs an ERROR and returns nullptr when the registry rejects it.
reflect::enum_info_of
reflect::enum_info_oftemplate <typename T> [[nodiscard]] const enum_info *enum_info_of() noexcept;The registered description of a CONJURE_REFLECT_ENUM type, registering it on first use. nullptr for enumerations without a description and when registration failed. Like type_info_of(), failures and removals are not cached.
reflect::registry
reflect::registry[[nodiscard]] CONJURE_API type_registry ®istry() noexcept;The process-wide registry that type_info_of() and enum_info_of() fill.
reflect::type_info_of
reflect::type_info_oftemplate <typename T> [[nodiscard]] const type_info *type_info_of() noexcept;The registered description of a CONJURE_REFLECT_STRUCT type, registering it in registry() on first use (thread-safe). nullptr for types without a description and when registration failed (a different type already owns the same name). Neither a failure nor a removal is cached: the cached pointer is re-validated against registry() on every call (one lock-free lookup), so the type registers again once the conflicting type is gone, and after registry().unregister_type() (module unload) the next call returns the fresh registration.