20 template <
typename KEY,
typename VALUE>
30 bool direct(
const KEY& k, VALUE& out_v)
const 32 auto i =
m_k2v.find(k);
33 if (i ==
m_k2v.end())
return false;
40 if (i ==
m_v2k.end())
return false;
56 template <
typename ENUMTYPE>
62 #define MRPT_ENUM_TYPE_BEGIN(_ENUM_TYPE_WITH_NS) \ 68 struct TEnumTypeFiller<_ENUM_TYPE_WITH_NS> \ 71 mrpt::typemeta::internal::bimap<_ENUM_TYPE_WITH_NS, std::string>& \ 74 #define MRPT_ENUM_TYPE_BEGIN_NAMESPACE(_NAMESPACE, _ENUM_TYPE_WITH_NS) \ 75 MRPT_ENUM_TYPE_BEGIN(_ENUM_TYPE_WITH_NS) \ 76 using namespace _NAMESPACE; 78 #define MRPT_ENUM_TYPE_END() \ 86 #define MRPT_FILL_ENUM(_X) m_map.insert(_X, #_X) 87 #define MRPT_FILL_ENUM_CUSTOM_NAME(_X, _NAME) m_map.insert(_X, _NAME) 88 #define MRPT_FILL_ENUM_MEMBER(_CLASS, _VALUE) \ 89 m_map.insert(_CLASS::_VALUE, #_VALUE) 93 template <
typename ENUMTYPE>
96 #define _MRPT_AUXTOSTR(__AA) #__AA 105 throw std::runtime_error(
107 TEnumType)
">::name2value(): Unknown name: ") +
120 throw std::runtime_error(
122 TEnumType)
">::value2name(): Unknown value: ") +
135 #undef _MRPT_AUXTOSTR
#define _MRPT_AUXTOSTR(__AA)
Eigen::Matrix< dataType, 4, 4 > inverse(Eigen::Matrix< dataType, 4, 4 > &pose)
GLsizei const GLchar ** string
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
GLuint const GLchar * name
std::string std::string to_string(T v)
Just like std::to_string(), but with an overloaded version for std::string arguments.
GLsizei GLsizei GLenum GLenum const GLvoid * data
const Scalar * const_iterator