Skip to content

Engine → Core

type_registry.h

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

struct state;

Functions

Public

reflect::detail::register_described_enum

[[nodiscard]] CONJURE_API const enum_info *register_described_enum(enum_info info) noexcept;

Registers a macro-built enumeration description in registry(); logs an ERROR and returns nullptr when the registry rejects it.

reflect::detail::register_described_type

[[nodiscard]] CONJURE_API const type_info *register_described_type(type_info info) noexcept;

Registers a macro-built struct description in registry(); logs an ERROR and returns nullptr when the registry rejects it.

reflect::enum_info_of

template <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

[[nodiscard]] CONJURE_API type_registry &registry() noexcept;

The process-wide registry that type_info_of() and enum_info_of() fill.

reflect::type_info_of

template <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.