The Sparta Modeling Framework
Loading...
Searching...
No Matches
sparta::utils::Enum< EnumType > Class Template Reference

Class that wraps a C++ class enum and allows conversion between POD and the enum type. Also provides strings for them. More...

#include <Enum.hpp>

Classes

class  iterator
 
class  UnknownNameException
 
class  Value
 

Public Types

typedef EnumType value_type
 

Public Member Functions

template<class... Args>
 Enum (const Args &...args)
 
 Enum (const Enum &other)
 
const Value operator() (const EnumType &val) const
 
const Value operator() (const uint32_t i) const
 
const Value operator() (const std::string &s) const
 
iterator begin () const
 
iterator end () const
 
size_t size () const
 

Static Public Member Functions

static void populateNames (std::vector< std::string > &names)
 Method which populates an argument vector with string-names of.
 

Friends

class Value
 

Detailed Description

template<class EnumType>
class sparta::utils::Enum< EnumType >

Class that wraps a C++ class enum and allows conversion between POD and the enum type. Also provides strings for them.

Definition at line 21 of file Enum.hpp.

Member Typedef Documentation

◆ value_type

template<class EnumType >
typedef EnumType sparta::utils::Enum< EnumType >::value_type

Definition at line 28 of file Enum.hpp.

Constructor & Destructor Documentation

◆ Enum() [1/3]

template<class EnumType >
sparta::utils::Enum< EnumType >::Enum ( )
inline

Definition at line 139 of file Enum.hpp.

◆ Enum() [2/3]

template<class EnumType >
template<class... Args>
sparta::utils::Enum< EnumType >::Enum ( const Args &...  args)
inline

Definition at line 142 of file Enum.hpp.

◆ Enum() [3/3]

template<class EnumType >
sparta::utils::Enum< EnumType >::Enum ( const Enum< EnumType > &  other)
inline

Definition at line 149 of file Enum.hpp.

Member Function Documentation

◆ begin()

template<class EnumType >
iterator sparta::utils::Enum< EnumType >::begin ( ) const
inline

Definition at line 179 of file Enum.hpp.

◆ end()

template<class EnumType >
iterator sparta::utils::Enum< EnumType >::end ( ) const
inline

Definition at line 184 of file Enum.hpp.

◆ operator()() [1/3]

template<class EnumType >
const Value sparta::utils::Enum< EnumType >::operator() ( const EnumType &  val) const
inline

Definition at line 154 of file Enum.hpp.

◆ operator()() [2/3]

template<class EnumType >
const Value sparta::utils::Enum< EnumType >::operator() ( const std::string &  s) const
inline

Definition at line 164 of file Enum.hpp.

◆ operator()() [3/3]

template<class EnumType >
const Value sparta::utils::Enum< EnumType >::operator() ( const uint32_t  i) const
inline

Definition at line 159 of file Enum.hpp.

◆ populateNames()

template<class EnumType >
static void sparta::utils::Enum< EnumType >::populateNames ( std::vector< std::string > &  names)
inlinestatic

Method which populates an argument vector with string-names of.

Definition at line 32 of file Enum.hpp.

◆ size()

template<class EnumType >
size_t sparta::utils::Enum< EnumType >::size ( ) const
inline

Definition at line 189 of file Enum.hpp.

Friends And Related Symbol Documentation

◆ Value

template<class EnumType >
friend class Value
friend

Definition at line 23 of file Enum.hpp.


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