#define CE_ASSERT(...)
Definition Macros.hpp:323
A value type that can hold any alongside it's type information.
Definition Box.hpp:40
Box cref() const &
Gets a reference to the meta value.
Represents a reflected enum from C++.
Definition Enum.hpp:26
void addElement(StringView name, ValueGetter &&value)
String name
Definition Enum.hpp:31
Optional< StringView > getName(const Box &value) const
Gets the name of an enum by value.
Generator< const EnumValue > forEachValue() const
Iterates over all enum values on the enum.
const EnumValue * getEnumValueWithValue(const Box &name) const
Gets the MetaEnumValue for the entry with the given value.
Optional< const Box & > getValue(StringView name) const
Gets the value of an enum by name.
FunctionView< bool(const EnumValue &) const > EnumerateElementFunction
Defines a type that represents the function to be called when iterating over all MetaEnumValue.
Definition Enum.hpp:39
UniqueFunction< Box() const > ValueGetter
Definition Enum.hpp:28
void forEachValue(const EnumerateElementFunction &func) const
Calls func for each value in the enum.
const EnumValue * getEnumValueWithName(StringView name) const
Gets the MetaEnumValue for the entry named name.
Represents an enum value.
Definition Enum.hpp:75
typename Enum::ValueGetter ValueGetter
Definition Enum.hpp:78
MetaCategory getCategory() const override
Gets the category of the item.
Definition Enum.hpp:102
StringView name
Definition Enum.hpp:81
static constexpr MetaCategory kCategory
Gets the category of the item.
Definition Enum.hpp:99
EnumValue(Enum &owner, StringView name, ValueGetter &&getter)
const Box & getValue() const noexcept
The enum value, as returned from the getter.
Definition Enum.hpp:106
Box mValue
The enum value, as returned from the getter.
Definition Enum.hpp:88
Box mValueReference
A const reference to the enum value.
Definition Enum.hpp:92
ValueGetter mValueGetter
The enum value getter function.
Definition Enum.hpp:85
A generator represents a coroutine type that produces a sequence of values of type T,...
Definition Generator.hpp:50
Definition Optional.hpp:17
Definition Application.hpp:19
MetaCategory
The category of a MetaItem.
Definition MetaItem.hpp:23
@ EnumValue
Indicates that the item is an enum value.
FunctionBase< false, true, fu2::capacity_default, true, false, Signatures... > FunctionView
A non owning copyable function wrapper for arbitrary callable types.
Definition Function.hpp:64
FunctionBase< true, false, fu2::capacity_default, true, false, Signatures... > UniqueFunction
An owning non copyable function wrapper for arbitrary callable types.
Definition Function.hpp:59
constexpr size_t hash(const T &v)
Generates a hash for the provided type.
Definition Hash.hpp:25