Main MRPT website > C++ reference for MRPT 1.5.7
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 22 of file CConfigFileBase.h.

#include <mrpt/utils/CConfigFileBase.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

◆ 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 35 of file TEnumType.h.

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

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

◆ 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 41 of file TEnumType.h.

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

Referenced by mrpt::obs::CObservation3DRangeScan::getDescriptionAsText().




Page generated by Doxygen 1.8.14 for MRPT 1.5.7 Git: 8277875f6 Mon Jun 11 02:47:32 2018 +0200 at lun oct 28 01:50:49 CET 2019