struct mrpt::maps::internal::TMetricMapTypesRegistry¶
Class factory & registry for map classes.
Used from mrpt::maps::TMetricMapInitializer
#include <mrpt/maps/TMetricMapTypesRegistry.h> struct TMetricMapTypesRegistry { // typedefs typedef std::map<std::string, std::pair<MapDefCtorFunctor, MapCtorFromDefFunctor>> TListRegisteredMaps; // methods static TMetricMapTypesRegistry& Instance(); size_t doRegister(const std::string& name, MapDefCtorFunctor func1, MapCtorFromDefFunctor func2); mrpt::maps::TMetricMapInitializer* factoryMapDefinition(const std::string& className) const; mrpt::maps::CMetricMap* factoryMapObjectFromDefinition(const mrpt::maps::TMetricMapInitializer& mi) const; const TListRegisteredMaps& getAllRegistered() const; };
Methods¶
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)
mrpt::maps::TMetricMapInitializer* factoryMapDefinition(const std::string& className) const
Return nullptr if not found.
mrpt::maps::CMetricMap* factoryMapObjectFromDefinition(const mrpt::maps::TMetricMapInitializer& mi) const
Return nullptr if not found.