A helper class that can convert an enum value into its textual representation, and viceversa.
Definition at line 24 of file config/CConfigFileBase.h.
#include <mrpt/config/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 internal::bimap< ENUMTYPE, std::string > & | getBimap () |
Singleton access. More... | |
|
inlinestatic |
Singleton access.
Definition at line 127 of file TEnumType.h.
References mrpt::typemeta::TEnumTypeFiller< ENUMTYPE >::fill().
Referenced by mrpt::typemeta::TEnumType< ENUMTYPE >::name2value(), and mrpt::typemeta::TEnumType< ENUMTYPE >::value2name().
|
inlinestatic |
Gives the numerical name for a given enum text name.
std::exception | on unknown enum name |
Definition at line 96 of file TEnumType.h.
References _MRPT_AUXTOSTR, mrpt::typemeta::TEnumType< ENUMTYPE >::getBimap(), mrpt::pbmap::inverse(), and val.
Referenced by mrpt::hwdrivers::CCameraSensor::initialize(), and mrpt::config::CConfigFileBase::read_enum().
|
inlinestatic |
Gives the textual name for a given enum value.
std::exception | on unknown enum value name |
Definition at line 112 of file TEnumType.h.
References _MRPT_AUXTOSTR, mrpt::typemeta::TEnumType< ENUMTYPE >::getBimap(), mrpt::to_string(), and val.
Page generated by Doxygen 1.8.17 for MRPT 1.9.9 Git: ad3a9d8ae Tue May 1 23:10:22 2018 -0700 at miƩ 12 jul 2023 10:03:34 CEST |