MRPT  2.0.3
Classes | Namespaces | Macros
TEnumType.h File Reference
#include <map>
#include <stdexcept>
#include <string>

Go to the source code of this file.

Classes

struct  mrpt::typemeta::internal::bimap< KEY, VALUE >
 
struct  mrpt::typemeta::TEnumTypeFiller< ENUMTYPE >
 Only specializations of this class are defined for each enum type of interest. More...
 
struct  mrpt::typemeta::TEnumType< ENUMTYPE >
 A helper class that can convert an enum value into its textual representation, and viceversa. More...
 

Namespaces

 mrpt
 This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
 
 mrpt::typemeta
 
 mrpt::typemeta::internal
 

Macros

#define MRPT_ENUM_TYPE_BEGIN(_ENUM_TYPE_WITH_NS)
 
#define MRPT_ENUM_TYPE_BEGIN_NAMESPACE(_NAMESPACE, _ENUM_TYPE_WITH_NS)
 
#define MRPT_ENUM_TYPE_END()
 
#define MRPT_FILL_ENUM(_X)   m_map.insert(_X, #_X)
 For use in specializations of TEnumTypeFiller. More...
 
#define MRPT_FILL_ENUM_CUSTOM_NAME(_X, _NAME)   m_map.insert(_X, _NAME)
 
#define MRPT_FILL_ENUM_MEMBER(_CLASS, _VALUE)   m_map.insert(_CLASS::_VALUE, #_VALUE)
 
#define _MRPT_AUXTOSTR(__AA)   #__AA
 

Macro Definition Documentation

◆ _MRPT_AUXTOSTR

#define _MRPT_AUXTOSTR (   __AA)    #__AA

Definition at line 96 of file TEnumType.h.

◆ MRPT_ENUM_TYPE_BEGIN

#define MRPT_ENUM_TYPE_BEGIN (   _ENUM_TYPE_WITH_NS)
Value:
namespace mrpt \
{ \
namespace typemeta \
{ \
template <> \
struct TEnumTypeFiller<_ENUM_TYPE_WITH_NS> \
{ \
static void fill( \
m_map) \
{
Examples
typemeta_TEnumType/test.cpp.

Definition at line 62 of file TEnumType.h.

◆ MRPT_ENUM_TYPE_BEGIN_NAMESPACE

#define MRPT_ENUM_TYPE_BEGIN_NAMESPACE (   _NAMESPACE,
  _ENUM_TYPE_WITH_NS 
)
Value:
MRPT_ENUM_TYPE_BEGIN(_ENUM_TYPE_WITH_NS) \
using namespace _NAMESPACE;

Definition at line 74 of file TEnumType.h.

◆ MRPT_ENUM_TYPE_END

#define MRPT_ENUM_TYPE_END ( )
Value:
} \
} \
; \
} \
}
Examples
typemeta_TEnumType/test.cpp.

Definition at line 78 of file TEnumType.h.

◆ MRPT_FILL_ENUM

#define MRPT_FILL_ENUM (   _X)    m_map.insert(_X, #_X)

For use in specializations of TEnumTypeFiller.

Examples
typemeta_TEnumType/test.cpp.

Definition at line 86 of file TEnumType.h.

◆ MRPT_FILL_ENUM_CUSTOM_NAME

#define MRPT_FILL_ENUM_CUSTOM_NAME (   _X,
  _NAME 
)    m_map.insert(_X, _NAME)

Definition at line 87 of file TEnumType.h.

◆ MRPT_FILL_ENUM_MEMBER

#define MRPT_FILL_ENUM_MEMBER (   _CLASS,
  _VALUE 
)    m_map.insert(_CLASS::_VALUE, #_VALUE)
Examples
typemeta_TEnumType/test.cpp.

Definition at line 88 of file TEnumType.h.

mrpt
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
Definition: BaseAppDataSource.h:15
MRPT_ENUM_TYPE_BEGIN
#define MRPT_ENUM_TYPE_BEGIN(_ENUM_TYPE_WITH_NS)
Definition: TEnumType.h:62
mrpt::typemeta::internal::bimap
Definition: TEnumType.h:22



Page generated by Doxygen 1.8.17 for MRPT 2.0.3 at Fri May 15 15:49:54 UTC 2020