A value type that can hold any alongside it's type information.
Definition Box.hpp:40
Represents a reflected enum from C++.
Definition Enum.hpp:26
Represents an enum value.
Definition Enum.hpp:75
Definition MetaItem.hpp:43
void set(const Type &type, Box &&value)
Sets the attribute for the given type.
bool has(const Type &type) const
Checks if the item has the given attribute type.
void set(Box &&value)
Sets the attribute for the given type.
HashMap< TypeID, Box > mAttributes
The underlying storage of the attributes.
Definition MetaItem.hpp:46
const T & get() const
Gets an item attribute by type.
Definition MetaItem.hpp:65
const Box & get(const Type &type) const
Gets an item attribute by type.
const T * getIf() const
Gets an item attribute if it exists.
Definition MetaItem.hpp:75
void forEach(const EnumerateFunction &func) const
Calls the func function for each attribute present on the item.
FunctionView< bool(const Box &) const > EnumerateFunction
A function that enumerates attributes of an item.
Definition MetaItem.hpp:50
bool has() const
Checks if the item has the given attribute type.
Definition MetaItem.hpp:55
Represents a reflected C++ type. Can be used to get metadata from a C++ type.
Definition Type.hpp:32
Definition Application.hpp:19
MetaCategory
The category of a MetaItem.
Definition MetaItem.hpp:23
@ Method
Indicates that the item is a method.
@ Property
Indicates that the item is a property.
@ Constructor
Indicates that the item is a constructor.
std::unordered_map< Key, T, Hash, KeyEqual, ScopedAllocatorAdaptor< StdAllocator< Pair< const Key, T >, RawAllocator > > > HashMap
HashMap is an associative container that contains key-value pairs with unique keys.
Definition Map.hpp:33
FunctionBase< false, true, fu2::capacity_default, true, false, Signatures... > FunctionView
A non owning copyable function wrapper for arbitrary callable types.
Definition Function.hpp:64
constexpr size_t hash(const T &v)
Generates a hash for the provided type.
Definition Hash.hpp:25