CeresEngine 0.2.0
A game development framework
Loading...
Searching...
No Matches
CeresEngine::EnumValue Class Reference

Represents an enum value. More...

#include <CeresEngine/Reflection/Enum.hpp>

Inheritance diagram for CeresEngine::EnumValue:
CeresEngine::MetaItem

Public Types

using ValueGetter = typename Enum::ValueGetter
 

Public Member Functions

 EnumValue (Enum &owner, StringView name, ValueGetter &&getter)
 
MetaCategory getCategory () const override
 Gets the category of the item.
 
const BoxgetValue () const noexcept
 The enum value, as returned from the getter.
 
- Public Member Functions inherited from CeresEngine::MetaItem
virtual ~MetaItem () noexcept=default
 

Public Attributes

StringView name
 

Static Public Attributes

static constexpr MetaCategory kCategory = MetaCategory::EnumValue
 Gets the category of the item.
 

Private Attributes

ValueGetter mValueGetter
 The enum value getter function.
 
Box mValue
 The enum value, as returned from the getter.
 
Box mValueReference
 A const reference to the enum value.
 

Detailed Description

Represents an enum value.

Member Typedef Documentation

◆ ValueGetter

Constructor & Destructor Documentation

◆ EnumValue()

CeresEngine::EnumValue::EnumValue ( Enum owner,
StringView  name,
ValueGetter &&  getter 
)
explicit

Member Function Documentation

◆ getCategory()

MetaCategory CeresEngine::EnumValue::getCategory ( ) const
inlineoverridevirtual

Gets the category of the item.

Implements CeresEngine::MetaItem.

◆ getValue()

const Box & CeresEngine::EnumValue::getValue ( ) const
inlinenoexcept

The enum value, as returned from the getter.

Member Data Documentation

◆ kCategory

constexpr MetaCategory CeresEngine::EnumValue::kCategory = MetaCategory::EnumValue
staticconstexpr

Gets the category of the item.

◆ mValue

Box CeresEngine::EnumValue::mValue
mutableprivate

The enum value, as returned from the getter.

◆ mValueGetter

ValueGetter CeresEngine::EnumValue::mValueGetter
private

The enum value getter function.

◆ mValueReference

Box CeresEngine::EnumValue::mValueReference
mutableprivate

A const reference to the enum value.

Allows better reference semantics when returning the enum.

◆ name

StringView CeresEngine::EnumValue::name

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