CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
CeresEngine::TEnum< T > Class Template Reference

#include <CeresEngine/Reflection/Enum.define.hpp>

Inheritance diagram for CeresEngine::TEnum< T >:
CeresEngine::TTypeInfoBase< T, Traits > CeresEngine::Enum CeresEngine::TypeInfo CeresEngine::MetaContainer

Public Member Functions

 TEnum ()
 
StringView getName () const noexcept final
 
void value (StringView name, const T &value)
 
- Public Member Functions inherited from CeresEngine::TTypeInfoBase< T, Traits >
TypeIdentityHash getIdentityHash () const noexcept override
 
std::size_t getSize () const noexcept override
 
std::size_t getAlignment () const noexcept override
 
const voidaccess (const void *target) const override
 Provides access to the object.
 
const TypeInfogetType (const TypeAttribute attribute) const override
 
- Public Member Functions inherited from CeresEngine::TypeInfo
virtual ~TypeInfo ()=default
 
TypeID getID () const noexcept
 
virtual const TypeInfodesugar () const
 Desugar the type into a raw type.
 
template<typename T >
bool is () const noexcept
 
template<typename T >
const Tas () const noexcept
 
template<typename T >
const Tbeing () const noexcept
 
const TypeInforemoveReference () const
 
const TypeInforemovePointer () const
 
const TypeInforemoveConst () const
 
- Public Member Functions inherited from CeresEngine::Enum
 Enum (const StringView name)
 
const EnumValuegetEnumValueWithName (StringView name) const
 Gets the MetaEnumValue for the entry named name.
 
const EnumValuegetEnumValueWithValue (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.
 
Optional< StringViewgetName (const Box &value) const
 Gets the name of an enum by value.
 
void forEachValue (const EnumerateElementFunction &func) const
 Calls func for each value in the enum.
 
Generator< const EnumValueforEachValue () const
 Iterates over all enum values on the enum.
 
- Public Member Functions inherited from CeresEngine::MetaContainer
template<typename T , typename Func >
void forEach (Func &&func) const
 
template<typename Func >
void forEach (MetaCategory category, Func &&func) const
 
template<typename T >
Generator< const TforEach () const
 
Generator< const MetaItemforEach (MetaCategory category) const
 

Additional Inherited Members

- Public Types inherited from CeresEngine::Enum
using ValueGetter = UniqueFunction< Box() const >
 
using EnumerateElementFunction = FunctionView< bool(const EnumValue &) const >
 Defines a type that represents the function to be called when iterating over all MetaEnumValue.
 
- Public Attributes inherited from CeresEngine::Enum
String name
 
- Protected Member Functions inherited from CeresEngine::Enum
void addElement (StringView name, ValueGetter &&value)
 
- Protected Member Functions inherited from CeresEngine::MetaContainer
 MetaContainer ()=default
 
virtual ~MetaContainer ()=default
 
bool addItem (MetaItem *value)
 
std::size_t count (MetaCategory category) const
 

Constructor & Destructor Documentation

◆ TEnum()

template<typename T >
CeresEngine::TEnum< T >::TEnum ( )
inlineexplicit

Member Function Documentation

◆ getName()

template<typename T >
StringView CeresEngine::TEnum< T >::getName ( ) const
inlinefinalvirtualnoexcept

Implements CeresEngine::TypeInfo.

◆ value()

template<typename T >
void CeresEngine::TEnum< T >::value ( StringView  name,
const T value 
)
inline

The documentation for this class was generated from the following file: