28 size_t TMetricMapTypesRegistry::doRegister(
32 std::vector<std::string> lstNames;
34 for (
size_t i = 0; i < lstNames.size(); i++)
35 m_registry[lstNames[i]] = std::make_pair(func1, func2);
36 return m_registry.size();
40 TMetricMapTypesRegistry::factoryMapDefinition(
44 if (it == m_registry.end())
return nullptr;
46 return (it->second.first)();
54 if (it == m_registry.end())
57 "[TMetricMapTypesRegistry] Error: Cannot create map of " 58 "unregistered map type '%s'",
Virtual base for specifying the kind and parameters of one map (normally, to be inserted into mrpt::m...
TMapGenericParams genericMapParams
Common params to all maps.
const mrpt::rtti::TRuntimeClassId::Ptr & getMetricMapClassType() const
Query the map type (C++ class), as set by the factory method MapDefinition()
void tokenize(const std::string &inString, const std::string &inDelimiters, OUT_CONTAINER &outTokens, bool skipBlankTokens=true) noexcept
Tokenizes a string according to a set of delimiting characters.
mrpt::maps::TMapGenericParams genericMapParams
Common params for all maps: These are automatically set in TMetricMapTypesRegistry::factoryMapObjectF...
#define ASSERT_(f)
Defines an assertion mechanism.
GLsizei const GLchar ** string
std::vector< string > names
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
Declares a virtual base class for all metric maps storage classes.
std::function< mrpt::maps::CMetricMap *(const mrpt::maps::TMetricMapInitializer &)> MapCtorFromDefFunctor
Class factory & registry for map classes.
#define THROW_EXCEPTION_FMT(_FORMAT_STRING,...)
const Scalar * const_iterator
std::function< mrpt::maps::TMetricMapInitializer *(void)> MapDefCtorFunctor