reflect.h
| File Path | engine/include/conjure/core/reflect/reflect.h |
| API ↗ | Reflection |
Umbrella header of the reflect area plus the description macros.
Functions
Public
reflect::detail::build_enum_description
reflect::detail::build_enum_descriptiontemplate <typename EnumType> [[nodiscard]] enum_info build_enum_description( std::string_view name, bool isFlags, std::initializer_list<std::pair<std::string, i64>> values );Assembles the enum_info of a macro-described enumeration.
reflect::detail::build_struct_description
reflect::detail::build_struct_descriptiontemplate <typename StructType> [[nodiscard]] type_info build_struct_description(std::string_view name, std::initializer_list<field_info> fields);Assembles the type_info of a macro-described struct.
reflect::detail::describe_value_type
reflect::detail::describe_value_typetemplate <typename ValueType> void describe_value_type(field_info &field, bool asElement);Fills kind, type and the struct/enum description pointer for one value type. asElement targets elementKind instead of kind (array elements).
reflect::detail::fill_default_values
reflect::detail::fill_default_valuesCONJURE_API void fill_default_values(type_info &info, const void *defaults);Serialises every field of defaults (an instance of the described type) into field_info::defaultValueJson.
reflect::detail::finish_struct_description
reflect::detail::finish_struct_descriptionCONJURE_API void finish_struct_description(type_info &info);Validates a macro-built description; an inconsistent layout is a programming error and asserts.
reflect::detail::make_field
reflect::detail::make_fieldtemplate <typename MemberType> [[nodiscard]] field_info make_field(std::string_view name, usize offset, field_attributes attributes);Builds the description of one member from its declared type, name and offset.