class final
#include <core/reflection/type_registry.hpp>
TypeRegistry Stores a set of types which can be accessed by name.
Public functions
- void insert(const Type& type)
- Registers the given type.
- void insert(const TypeRegistry& other)
- Calls insert for each type in the given type registry.
-
template<typename T>void insert()
- Registers the given type.
- auto contains(const Type& type) const -> bool
- Checks if the given type is registered.
-
template<typename T>auto contains() const -> bool
- auto contains(const std::string& name) const -> bool
- Checks if a type with the given name is registered.
- auto at(const std::string& name) const -> const Type&
- Returns the type with the given name.
- auto size() const -> std::size_t
- Returns the number of registered types.
- auto begin() const -> Iterator
- Gets an iterator to the beginning of the registry.
- auto end() const -> Iterator
- Gets an iterator to the end of the registry.
Function documentation
void cubos:: core:: reflection:: TypeRegistry:: insert(const TypeRegistry& other)
Calls insert for each type in the given type registry.
Parameters | |
---|---|
other | Type registry to copy types from. |
bool cubos:: core:: reflection:: TypeRegistry:: contains(const std::string& name) const
Checks if a type with the given name is registered.
Parameters | |
---|---|
name | Name of the type. |
Returns | Whether a type with the given name is registered. |
std::size_t cubos:: core:: reflection:: TypeRegistry:: size() const
Returns the number of registered types.
Returns | Number of registered types. |
---|