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