9 #ifndef mrpt_TEnumType_H 10 #define mrpt_TEnumType_H 23 template <
typename ENUMTYPE>
31 #define MRPT_FILL_ENUM(_X) m_map.insert(_X, #_X) 32 #define MRPT_FILL_ENUM_MEMBER(_CLASS, _VALUE) \ 33 m_map.insert(_CLASS::_VALUE, #_VALUE) 37 template <
typename ENUMTYPE>
static ENUMTYPE name2value(const std::string &name)
Gives the numerical name for a given enum text name.
static void fill(mrpt::utils::bimap< enum_t, std::string > &m_map)
Only specializations of this class are defined for each enum type of interest.
A helper class that can convert an enum value into its textual representation, and viceversa...
A bidirectional version of std::map, declared as bimap<KEY,VALUE> and which actually contains two std...
GLsizei const GLchar ** string
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
static std::string value2name(const ENUMTYPE val)
Gives the textual name for a given enum value.
GLuint const GLchar * name
GLsizei GLsizei GLenum GLenum const GLvoid * data
static bimap< ENUMTYPE, std::string > & getBimap()
Singleton access.