type_id.h
| File Path | engine/include/conjure/core/reflect/type_id.h |
| API ↗ | Reflection |
Type identifiers.
Structs
| File | Description |
|---|---|
reflect::type_id |
Identity of a reflected type: the FNV-1a 64 hash of its registered name. The null id (0) means "no type". |
std::formatter<conjure::core::reflect::type_id> |
|
std::hash<conjure::core::reflect::type_id> |
Concepts
reflect::has_kind_override
template <typename T> concept has_kind_override = requires { { reflect_kind_override<std::remove_cvref_t<T>>::NAME } -> std::convertible_to<std::string_view>; };
True when reflect_kind_override is specialised for T with a NAME.
reflect::has_reflect_name
template <typename T> concept has_reflect_name = requires { { reflect_traits<std::remove_cvref_t<T>>::NAME } -> std::convertible_to<std::string_view>; };
True when reflect_traits is specialised for T with a NAME.
reflect::reflect_named
True when a registered name is known for T through either customisation point.
Forward Declarations
reflect::reflect_kind_override
Customisation point for handle types owned by other modules: specialise it with static constexpr field_kind KIND (ENTITY or ASSET_REF) and static constexpr std::string_view NAME and the type becomes a reflectable field of that kind without core knowing the type.
reflect::reflect_traits
Compile-time description of a reflected type. Specialisations provide at least static constexpr std::string_view NAME and static constexpr field_kind KIND; structs and enums described with the reflect.h macros also provide describe().
Functions
Public
reflect::reflect_name_of
reflect::reflect_name_oftemplate <reflect_named T> [[nodiscard]] constexpr std::string_view reflect_name_of() noexcept;The registered name of T. The kind override wins so a module may rename a type it reflects.
reflect::type_id_of
reflect::type_id_oftemplate <reflect_named T> [[nodiscard]] constexpr type_id type_id_of() noexcept;The type_id of T, computed at compile time from its registered name.