Main MRPT website > C++ reference for MRPT 1.9.9
List of all members | Static Public Member Functions
mrpt::utils::TEnumType< ENUMTYPE > Struct Template Reference

Detailed Description

template<typename ENUMTYPE>
struct mrpt::utils::TEnumType< ENUMTYPE >

A helper class that can convert an enum value into its textual representation, and viceversa.

Definition at line 38 of file TEnumType.h.

#include <mrpt/utils/TEnumType.h>

Static Public Member Functions

static ENUMTYPE name2value (const std::string &name)
 Gives the numerical name for a given enum text name. More...
 
static std::string value2name (const ENUMTYPE val)
 Gives the textual name for a given enum value. More...
 
static bimap< ENUMTYPE, std::string > & getBimap ()
 Singleton access. More...
 

Member Function Documentation

◆ getBimap()

template<typename ENUMTYPE >
static bimap<ENUMTYPE, std::string>& mrpt::utils::TEnumType< ENUMTYPE >::getBimap ( )
inlinestatic

Singleton access.

Definition at line 55 of file TEnumType.h.

Referenced by mrpt::utils::TEnumType< ENUMTYPE >::name2value(), and mrpt::utils::TEnumType< ENUMTYPE >::value2name().

Here is the caller graph for this function:

◆ name2value()

template<typename ENUMTYPE >
static ENUMTYPE mrpt::utils::TEnumType< ENUMTYPE >::name2value ( const std::string name)
inlinestatic

Gives the numerical name for a given enum text name.

Exceptions
std::exceptionon unknown enum name

Definition at line 42 of file TEnumType.h.

References mrpt::utils::TEnumType< ENUMTYPE >::getBimap().

Referenced by mrpt::utils::CConfigFileBase::read_enum().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ value2name()

template<typename ENUMTYPE >
static std::string mrpt::utils::TEnumType< ENUMTYPE >::value2name ( const ENUMTYPE  val)
inlinestatic

Gives the textual name for a given enum value.

Exceptions
std::exceptionon unknown enum value name

Definition at line 49 of file TEnumType.h.

References mrpt::utils::TEnumType< ENUMTYPE >::getBimap(), and val.

Here is the call graph for this function:



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: ae4571287 Thu Nov 23 00:06:53 2017 +0100 at dom oct 27 23:51:55 CET 2019