Main MRPT website > C++ reference for MRPT 1.5.6
Classes | Namespaces | Macros | Typedefs
TMetricMapTypesRegistry.h File Reference
#include <mrpt/utils/core_defs.h>
#include <mrpt/obs/link_pragmas.h>
#include <mrpt/obs/obs_frwds.h>
#include <map>
#include <string>
Include dependency graph for TMetricMapTypesRegistry.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  mrpt::maps::internal::TMetricMapTypesRegistry
 Class factory & registry for map classes. More...
 

Namespaces

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

Macros

#define MAP_DEFINITION_START(_CLASS_NAME_, _LINKAGE_)
 Add a MAP_DEFINITION_START() ... More...
 
#define MAP_DEFINITION_END(_CLASS_NAME_, _LINKAGE_)
 
#define MAP_DEFINITION_REGISTER(_CLASSNAME_STRINGS, _CLASSNAME_WITH_NS)
 Registers one map class into TMetricMapInitializer factory. More...
 

Typedefs

typedef mrpt::maps::TMetricMapInitializer *(* mrpt::maps::internal::MapDefCtorFunctor) (void)
 
typedef mrpt::maps::CMetricMap *(* mrpt::maps::internal::MapCtorFromDefFunctor) (const mrpt::maps::TMetricMapInitializer &)
 

Macro Definition Documentation

◆ MAP_DEFINITION_END

#define MAP_DEFINITION_END (   _CLASS_NAME_,
  _LINKAGE_ 
)
Value:
TMapDefinition();\
protected: \
void loadFromConfigFile_map_specific(const mrpt::utils::CConfigFileBase &source, const std::string &sectionNamePrefix) MRPT_OVERRIDE; \
void dumpToTextStream_map_specific(mrpt::utils::CStream &out) const MRPT_OVERRIDE; \
}; \
/** Returns default map definition initializer. See mrpt::maps::TMetricMapInitializer */ \
static mrpt::maps::TMetricMapInitializer* MapDefinition(); \
/** Constructor from a map definition structure: initializes the map and its parameters accordingly */ \
static _CLASS_NAME_* CreateFromMapDefinition(const mrpt::maps::TMetricMapInitializer &def); \
static mrpt::maps::CMetricMap* internal_CreateFromMapDefinition(const mrpt::maps::TMetricMapInitializer &def); \
/** ID used to initialize class registration (just ignore it) */ \
static const size_t m_private_map_register_id; \
/** @} */
Virtual base for specifying the kind and parameters of one map (normally, to be inserted into mrpt::m...
#define MRPT_OVERRIDE
C++11 "override" for virtuals:
This class allows loading and storing values and vectors of different types from a configuration text...
This base class is used to provide a unified interface to files,memory buffers,..Please see the deriv...
Definition: CStream.h:38
GLsizei const GLchar ** string
Definition: glext.h:3919
Declares a virtual base class for all metric maps storage classes.
GLsizei GLsizei GLchar * source
Definition: glext.h:3908

Definition at line 52 of file TMetricMapTypesRegistry.h.

◆ MAP_DEFINITION_REGISTER

#define MAP_DEFINITION_REGISTER (   _CLASSNAME_STRINGS,
  _CLASSNAME_WITH_NS 
)
Value:
const size_t _CLASSNAME_WITH_NS::m_private_map_register_id = mrpt::maps::internal::TMetricMapTypesRegistry::Instance().doRegister(_CLASSNAME_STRINGS,&_CLASSNAME_WITH_NS::MapDefinition,&_CLASSNAME_WITH_NS::internal_CreateFromMapDefinition); \
mrpt::maps::TMetricMapInitializer* _CLASSNAME_WITH_NS::MapDefinition() { return new _CLASSNAME_WITH_NS::TMapDefinition; } \
_CLASSNAME_WITH_NS* _CLASSNAME_WITH_NS::CreateFromMapDefinition(const mrpt::maps::TMetricMapInitializer &def) \
{ return dynamic_cast<_CLASSNAME_WITH_NS*>(_CLASSNAME_WITH_NS::internal_CreateFromMapDefinition(def)); }
Virtual base for specifying the kind and parameters of one map (normally, to be inserted into mrpt::m...
size_t doRegister(const std::string &name, MapDefCtorFunctor func1, MapCtorFromDefFunctor func2)
Return the index of the class in the list (not important, just used as a trick to initialize static m...

Registers one map class into TMetricMapInitializer factory.

One or several alternative class names can be provided, separated with whitespaces or commas

Definition at line 69 of file TMetricMapTypesRegistry.h.

◆ MAP_DEFINITION_START

#define MAP_DEFINITION_START (   _CLASS_NAME_,
  _LINKAGE_ 
)
Value:
public: \
/** @name Map Definition Interface stuff (see mrpt::maps::TMetricMapInitializer) @{ */ \
struct _LINKAGE_ TMapDefinitionBase : public mrpt::maps::TMetricMapInitializer { \
TMapDefinitionBase() : TMetricMapInitializer(CLASS_ID(_CLASS_NAME_)) { } \
};\
struct _LINKAGE_ TMapDefinition : public TMapDefinitionBase { \
Virtual base for specifying the kind and parameters of one map (normally, to be inserted into mrpt::m...
#define CLASS_ID(class_name)
Access to runtime class ID for a defined class name.
Definition: CObject.h:92

Add a MAP_DEFINITION_START() ...

MAP_DEFINITION_END() block inside the declaration of each metric map

Definition at line 44 of file TMetricMapTypesRegistry.h.




Page generated by Doxygen 1.8.14 for MRPT 1.5.6 Git: 4c65e8431 Tue Apr 24 08:18:17 2018 +0200 at lun oct 28 01:35:26 CET 2019