MRPT  1.9.9
mrpt::maps::internal::TMetricMapTypesRegistry Struct Reference

Detailed Description

Class factory & registry for map classes.

Used from mrpt::maps::TMetricMapInitializer

Definition at line 31 of file TMetricMapTypesRegistry.h.

#include <mrpt/maps/TMetricMapTypesRegistry.h>

Public Types

using TListRegisteredMaps = std::map< std::string, std::pair< MapDefCtorFunctor, MapCtorFromDefFunctor > >
 

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::TMetricMapInitializerfactoryMapDefinition (const std::string &className) const
 Return nullptr if not found. More...
 
mrpt::maps::CMetricMapfactoryMapObjectFromDefinition (const mrpt::maps::TMetricMapInitializer &mi) const
 Return nullptr if not found. More...
 
const TListRegisteredMapsgetAllRegistered () const
 

Static Public Member Functions

static TMetricMapTypesRegistryInstance ()
 

Private Member Functions

 TMetricMapTypesRegistry ()=default
 

Private Attributes

TListRegisteredMaps m_registry
 

Member Typedef Documentation

◆ TListRegisteredMaps

Constructor & Destructor Documentation

◆ TMetricMapTypesRegistry()

mrpt::maps::internal::TMetricMapTypesRegistry::TMetricMapTypesRegistry ( )
privatedefault

Member Function Documentation

◆ doRegister()

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 names, and mrpt::system::tokenize().

Here is the call graph for this function:

◆ factoryMapDefinition()

mrpt::maps::TMetricMapInitializer * TMetricMapTypesRegistry::factoryMapDefinition ( const std::string className) const

Return nullptr if not found.

Definition at line 40 of file TMetricMapTypesRegistry.cpp.

References ASSERT_.

◆ factoryMapObjectFromDefinition()

mrpt::maps::CMetricMap * TMetricMapTypesRegistry::factoryMapObjectFromDefinition ( const mrpt::maps::TMetricMapInitializer mi) const

Return nullptr if not found.

Definition at line 49 of file TMetricMapTypesRegistry.cpp.

References ASSERT_, mrpt::maps::TMetricMapInitializer::genericMapParams, mrpt::maps::CMetricMap::genericMapParams, mrpt::maps::TMetricMapInitializer::getMetricMapClassType(), and THROW_EXCEPTION_FMT.

Here is the call graph for this function:

◆ getAllRegistered()

const TListRegisteredMaps& mrpt::maps::internal::TMetricMapTypesRegistry::getAllRegistered ( ) const
inline

Definition at line 48 of file TMetricMapTypesRegistry.h.

References m_registry.

◆ Instance()

TMetricMapTypesRegistry & TMetricMapTypesRegistry::Instance ( )
static

Definition at line 22 of file TMetricMapTypesRegistry.cpp.

Referenced by mrpt::maps::CMultiMetricMap::setListOfMaps().

Here is the caller graph for this function:

Member Data Documentation

◆ m_registry

TListRegisteredMaps mrpt::maps::internal::TMetricMapTypesRegistry::m_registry
private

Definition at line 52 of file TMetricMapTypesRegistry.h.

Referenced by getAllRegistered().




Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: abb8b1a1e Fri Oct 18 14:19:12 2019 +0200 at vie oct 18 14:20:13 CEST 2019