A helper class that can convert an enum value into its textual representation, and viceversa.
#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
| |||
| static std::string | value2name (const ENUMTYPE val) | ||
Gives the textual name for a given enum value
| |||
| static bimap< ENUMTYPE, std::string > & | getBimap () | ||
| Singleton access. | |||
| static bimap<ENUMTYPE,std::string>& mrpt::utils::TEnumType::getBimap | ( | ) | [inline, static] |
Singleton access.
Definition at line 68 of file TEnumType.h.
Referenced by name2value(), and value2name().
| static ENUMTYPE mrpt::utils::TEnumType::name2value | ( | const std::string & | name | ) | [inline, static] |
Gives the numerical name for a given enum text name
| std::exception | on unknown enum name. |
Definition at line 54 of file TEnumType.h.
References getBimap(), empty(), and fill().
| static std::string mrpt::utils::TEnumType::value2name | ( | const ENUMTYPE | val | ) | [inline, static] |
Gives the textual name for a given enum value
| std::exception | on unknown enum value name. |
Definition at line 61 of file TEnumType.h.
References getBimap(), empty(), and fill().
| Page generated by Doxygen 1.7.5 for MRPT 0.9.5 SVN: at Thu Oct 13 21:25:36 UTC 2011 |