MRPT  2.0.0
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes
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

Definition at line 47 of file TMetricMapTypesRegistry.h.

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 37 of file TMetricMapTypesRegistry.cpp.

References names, stripNamespace(), 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 55 of file TMetricMapTypesRegistry.cpp.

References ASSERT_, and stripNamespace().

Here is the call graph for this function:

◆ factoryMapObjectFromDefinition()

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

Return nullptr if not found.

Definition at line 68 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 2.0.0 Git: b38439d21 Tue Mar 31 19:58:06 2020 +0200 at miƩ abr 1 00:50:30 CEST 2020