Main MRPT website > C++ reference for MRPT 1.5.6
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

Exceptions
std::exceptionon unknown enum name.
More...
 
static std::string value2name (const ENUMTYPE val)
 Gives the textual name for a given enum value

Exceptions
std::exceptionon unknown enum value name.
More...
 
static bimap< ENUMTYPE,
std::string > & 
getBimap ()
 Singleton access. More...
 

Member Function Documentation

template<typename ENUMTYPE >
static bimap<ENUMTYPE,std::string>& mrpt::utils::TEnumType< ENUMTYPE >::getBimap ( )
inlinestatic
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().

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().

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




Page generated by Doxygen 1.8.6 for MRPT 1.5.6 Git: 4c65e84 Tue Apr 24 08:18:17 2018 +0200 at mar abr 24 08:26:17 CEST 2018