Class factory & registry for map classes.
Used from mrpt::maps::TMetricMapInitializer
Definition at line 29 of file TMetricMapTypesRegistry.h.
#include <mrpt/maps/TMetricMapTypesRegistry.h>
Public Types | |
| typedef std::map< std::string, std::pair< MapDefCtorFunctor, MapCtorFromDefFunctor > > | TListRegisteredMaps |
Public Member Functions | |
| 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 members) More... | |
| mrpt::maps::TMetricMapInitializer * | factoryMapDefinition (const std::string &className) const |
| Return NULL if not found. More... | |
| mrpt::maps::CMetricMap * | factoryMapObjectFromDefinition (const mrpt::maps::TMetricMapInitializer &mi) const |
| Return NULL if not found. More... | |
| const TListRegisteredMaps & | getAllRegistered () const |
Static Public Member Functions | |
| static TMetricMapTypesRegistry & | Instance () |
Private Member Functions | |
| TMetricMapTypesRegistry () | |
Private Attributes | |
| TListRegisteredMaps | m_registry |
| typedef std::map<std::string,std::pair<MapDefCtorFunctor,MapCtorFromDefFunctor> > mrpt::maps::internal::TMetricMapTypesRegistry::TListRegisteredMaps |
Definition at line 36 of file TMetricMapTypesRegistry.h.
|
inlineprivate |
Definition at line 39 of file TMetricMapTypesRegistry.h.
| size_t TMetricMapTypesRegistry::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 members)
Definition at line 28 of file TMetricMapTypesRegistry.cpp.
References mrpt::system::tokenize().
| mrpt::maps::TMetricMapInitializer * TMetricMapTypesRegistry::factoryMapDefinition | ( | const std::string & | className | ) | const |
Return NULL if not found.
Definition at line 37 of file TMetricMapTypesRegistry.cpp.
References ASSERT_.
| mrpt::maps::CMetricMap * TMetricMapTypesRegistry::factoryMapObjectFromDefinition | ( | const mrpt::maps::TMetricMapInitializer & | mi | ) | const |
Return NULL if not found.
Definition at line 45 of file TMetricMapTypesRegistry.cpp.
References ASSERT_, mrpt::maps::TMetricMapInitializer::genericMapParams, mrpt::maps::CMetricMap::genericMapParams, mrpt::maps::TMetricMapInitializer::getMetricMapClassType(), and THROW_EXCEPTION_FMT.
Referenced by mrpt::maps::CMultiMetricMap::setListOfMaps().
|
inline |
Definition at line 37 of file TMetricMapTypesRegistry.h.
|
static |
Definition at line 22 of file TMetricMapTypesRegistry.cpp.
Referenced by mrpt::maps::CMultiMetricMap::setListOfMaps().
|
private |
Definition at line 40 of file TMetricMapTypesRegistry.h.
| Page generated by Doxygen 1.8.14 for MRPT 1.5.7 Git: 5902e14cc Wed Apr 24 15:04:01 2019 +0200 at lun oct 28 01:39:17 CET 2019 |