ponder 3.2
C++ reflection library
ponder::Enum::Pair Struct Reference

Structure defining the <name, value> pairs stored in metaenums. More...

#include <enum.hpp>

Public Member Functions

 Pair (IdRef name_, EnumValue value_)
 Constructor. More...
 
template<typename E >
valueAs () const
 Helper to return value as require enum class type. More...
 

Public Attributes

Id name
 Enum name.
 
EnumValue value
 Enum value.
 

Detailed Description

Structure defining the <name, value> pairs stored in metaenums.

Constructor & Destructor Documentation

◆ Pair()

ponder::Enum::Pair::Pair ( IdRef  name_,
EnumValue  value_ 
)
inline

Constructor.

Parameters
name_Name of the enum item.
value_Value of the enum item.

Member Function Documentation

◆ valueAs()

template<typename E >
E ponder::Enum::Pair::valueAs ( ) const
inline

Helper to return value as require enum class type.

E.g. pair.valueAs<MyEnum>().

Returns
Value as requested type

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