Main MRPT website > C++ reference for MRPT 1.9.9
List of all members | Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | Protected Member Functions | Static Protected Member Functions | Protected Attributes | Friends
mrpt::maps::TMetricMapInitializer Struct Referenceabstract

Detailed Description

Virtual base for specifying the kind and parameters of one map (normally, to be inserted into mrpt::maps::CMultiMetricMap) See mrpt::maps::TSetOfMetricMapInitializers::loadFromConfigFile() as an easy way of initialize this object, or construct with the factory methods <metric_map_class>::MapDefinition() and TMetricMapInitializer::factory()

See also
TSetOfMetricMapInitializers, mrpt::maps::CMultiMetricMap

Definition at line 34 of file TMetricMapInitializer.h.

#include <mrpt/maps/TMetricMapInitializer.h>

Inheritance diagram for mrpt::maps::TMetricMapInitializer:
Inheritance graph

Public Types

using Ptr = std::shared_ptr< TMetricMapInitializer >
 Smart pointer to TMetricMapInitializer. More...
 

Public Member Functions

void loadFromConfigFile (const mrpt::utils::CConfigFileBase &source, const std::string &sectionNamePrefix) override
 Load all params from a config file/source. More...
 
void dumpToTextStream (mrpt::utils::CStream &out) const override
 Dump the options of the metric map in human-readable format. More...
 
const mrpt::utils::TRuntimeClassId::PtrgetMetricMapClassType () const
 Query the map type (C++ class), as set by the factory method MapDefinition() More...
 
void loadFromConfigFileName (const std::string &config_file, const std::string &section)
 Behaves like loadFromConfigFile, but you can pass directly a file name and a temporary CConfigFile object will be created automatically to load the file. More...
 
virtual void saveToConfigFile (mrpt::utils::CConfigFileBase &target, const std::string &section) const
 This method saves the options to a ".ini"-like file or memory-stored string list. More...
 
void saveToConfigFileName (const std::string &config_file, const std::string &section) const
 Behaves like saveToConfigFile, but you can pass directly a file name and a temporary CConfigFile object will be created automatically to save the file. More...
 
void dumpToConsole () const
 Just like dumpToTextStream() but sending the text to the console (std::cout) More...
 

Static Public Member Functions

static TMetricMapInitializerfactory (const std::string &mapClassName)
 Looks up in the registry of known map types and call the corresponding <metric_map_class>::MapDefinition(). More...
 

Public Attributes

mrpt::maps::TMapGenericParams genericMapParams
 Common params for all maps: These are automatically set in TMetricMapTypesRegistry::factoryMapObjectFromDefinition() More...
 

Protected Member Functions

 TMetricMapInitializer (const mrpt::utils::TRuntimeClassId *classID)
 
virtual void loadFromConfigFile_map_specific (const mrpt::utils::CConfigFileBase &source, const std::string &sectionNamePrefix)=0
 Load all map-specific params. More...
 
virtual void dumpToTextStream_map_specific (mrpt::utils::CStream &out) const =0
 

Static Protected Member Functions

static void dumpVar_int (CStream &out, const char *varName, int v)
 Used to print variable info from dumpToTextStream with the macro LOADABLEOPTS_DUMP_VAR. More...
 
static void dumpVar_float (CStream &out, const char *varName, float v)
 
static void dumpVar_double (CStream &out, const char *varName, double v)
 
static void dumpVar_bool (CStream &out, const char *varName, bool v)
 
static void dumpVar_string (CStream &out, const char *varName, const std::string &v)
 

Protected Attributes

const mrpt::utils::TRuntimeClassId::Ptr metricMapClassType
 Derived classes set this to CLASS_ID(< class >) where < class > is any CMetricMap derived class. More...
 

Friends

class TSetOfMetricMapInitializers
 

Member Typedef Documentation

◆ Ptr

Smart pointer to TMetricMapInitializer.

Definition at line 38 of file TMetricMapInitializer.h.

Constructor & Destructor Documentation

◆ TMetricMapInitializer()

TMetricMapInitializer::TMetricMapInitializer ( const mrpt::utils::TRuntimeClassId classID)
protected

Definition at line 30 of file TMetricMapInitializer.cpp.

Member Function Documentation

◆ dumpToConsole()

void CLoadableOptions::dumpToConsole ( ) const
inherited

Just like dumpToTextStream() but sending the text to the console (std::cout)

Definition at line 44 of file CLoadableOptions.cpp.

References mrpt::utils::CLoadableOptions::dumpToTextStream(), and loadable_opts_my_cout.

Referenced by mrpt::hmtslam::CTopLCDetector_GridMatching::computeTopologicalObservationModel(), and mrpt::graphslam::optimizers::CLevMarqGSO< GRAPH_T >::printParams().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ dumpToTextStream()

void TMetricMapInitializer::dumpToTextStream ( mrpt::utils::CStream out) const
overridevirtual

Dump the options of the metric map in human-readable format.

Reimplemented from mrpt::utils::CLoadableOptions.

Definition at line 52 of file TMetricMapInitializer.cpp.

References mrpt::maps::TMapGenericParams::dumpToTextStream(), dumpToTextStream_map_specific(), genericMapParams, metricMapClassType, and mrpt::utils::CStream::printf().

Here is the call graph for this function:

◆ dumpToTextStream_map_specific()

virtual void mrpt::maps::TMetricMapInitializer::dumpToTextStream_map_specific ( mrpt::utils::CStream out) const
protectedpure virtual

◆ dumpVar_bool()

void CLoadableOptions::dumpVar_bool ( CStream out,
const char *  varName,
bool  v 
)
staticprotectedinherited

Definition at line 65 of file CLoadableOptions.cpp.

References LOADABLEOPTS_COLUMN_WIDTH, and mrpt::utils::CStream::printf().

Here is the call graph for this function:

◆ dumpVar_double()

void CLoadableOptions::dumpVar_double ( CStream out,
const char *  varName,
double  v 
)
staticprotectedinherited

Definition at line 59 of file CLoadableOptions.cpp.

References LOADABLEOPTS_COLUMN_WIDTH, and mrpt::utils::CStream::printf().

Here is the call graph for this function:

◆ dumpVar_float()

void CLoadableOptions::dumpVar_float ( CStream out,
const char *  varName,
float  v 
)
staticprotectedinherited

Definition at line 54 of file CLoadableOptions.cpp.

References LOADABLEOPTS_COLUMN_WIDTH, and mrpt::utils::CStream::printf().

Here is the call graph for this function:

◆ dumpVar_int()

void CLoadableOptions::dumpVar_int ( CStream out,
const char *  varName,
int  v 
)
staticprotectedinherited

Used to print variable info from dumpToTextStream with the macro LOADABLEOPTS_DUMP_VAR.

Definition at line 49 of file CLoadableOptions.cpp.

References LOADABLEOPTS_COLUMN_WIDTH, and mrpt::utils::CStream::printf().

Here is the call graph for this function:

◆ dumpVar_string()

void CLoadableOptions::dumpVar_string ( CStream out,
const char *  varName,
const std::string v 
)
staticprotectedinherited

Definition at line 71 of file CLoadableOptions.cpp.

References LOADABLEOPTS_COLUMN_WIDTH, and mrpt::utils::CStream::printf().

Here is the call graph for this function:

◆ factory()

TMetricMapInitializer * TMetricMapInitializer::factory ( const std::string mapClassName)
static

Looks up in the registry of known map types and call the corresponding <metric_map_class>::MapDefinition().

Definition at line 22 of file TMetricMapInitializer.cpp.

◆ getMetricMapClassType()

const mrpt::utils::TRuntimeClassId::Ptr& mrpt::maps::TMetricMapInitializer::getMetricMapClassType ( ) const
inline

Query the map type (C++ class), as set by the factory method MapDefinition()

Definition at line 59 of file TMetricMapInitializer.h.

References metricMapClassType.

Referenced by mrpt::maps::internal::TMetricMapTypesRegistry::factoryMapObjectFromDefinition().

Here is the caller graph for this function:

◆ loadFromConfigFile()

void TMetricMapInitializer::loadFromConfigFile ( const mrpt::utils::CConfigFileBase source,
const std::string sectionNamePrefix 
)
overridevirtual

Load all params from a config file/source.

For examples and format, read the docs of mrpt::maps::CMultiMetricMap Typical section names:

  • <sectionNamePrefix>_creationOpts
  • <sectionNamePrefix>_insertOpts
  • <sectionNamePrefix>_likelihoodOpts

For examples and format, read the docs of mrpt::maps::CMultiMetricMap

Implements mrpt::utils::CLoadableOptions.

Definition at line 38 of file TMetricMapInitializer.cpp.

References genericMapParams, mrpt::maps::TMapGenericParams::loadFromConfigFile(), and loadFromConfigFile_map_specific().

Referenced by mrpt::maps::TSetOfMetricMapInitializers::loadFromConfigFile(), mrpt::maps::CSimplePointsMap::TMapDefinition::loadFromConfigFile_map_specific(), mrpt::maps::CWeightedPointsMap::TMapDefinition::loadFromConfigFile_map_specific(), and mrpt::maps::CColouredPointsMap::TMapDefinition::loadFromConfigFile_map_specific().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ loadFromConfigFile_map_specific()

virtual void mrpt::maps::TMetricMapInitializer::loadFromConfigFile_map_specific ( const mrpt::utils::CConfigFileBase source,
const std::string sectionNamePrefix 
)
protectedpure virtual

◆ loadFromConfigFileName()

void CLoadableOptions::loadFromConfigFileName ( const std::string config_file,
const std::string section 
)
inherited

Behaves like loadFromConfigFile, but you can pass directly a file name and a temporary CConfigFile object will be created automatically to load the file.

See also
loadFromConfigFile

Definition at line 22 of file CLoadableOptions.cpp.

References mrpt::utils::CLoadableOptions::loadFromConfigFile().

Referenced by mrpt::graphslam::optimizers::CLevMarqGSO< GRAPH_T >::loadParams().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ saveToConfigFile()

void CLoadableOptions::saveToConfigFile ( mrpt::utils::CConfigFileBase target,
const std::string section 
) const
virtualinherited

◆ saveToConfigFileName()

void CLoadableOptions::saveToConfigFileName ( const std::string config_file,
const std::string section 
) const
inherited

Behaves like saveToConfigFile, but you can pass directly a file name and a temporary CConfigFile object will be created automatically to save the file.

See also
saveToConfigFile, loadFromConfigFileName

Definition at line 37 of file CLoadableOptions.cpp.

References mrpt::utils::CLoadableOptions::saveToConfigFile().

Here is the call graph for this function:

Friends And Related Function Documentation

◆ TSetOfMetricMapInitializers

friend class TSetOfMetricMapInitializers
friend

Definition at line 36 of file TMetricMapInitializer.h.

Member Data Documentation

◆ genericMapParams

mrpt::maps::TMapGenericParams mrpt::maps::TMetricMapInitializer::genericMapParams

Common params for all maps: These are automatically set in TMetricMapTypesRegistry::factoryMapObjectFromDefinition()

Definition at line 42 of file TMetricMapInitializer.h.

Referenced by dumpToTextStream(), mrpt::maps::internal::TMetricMapTypesRegistry::factoryMapObjectFromDefinition(), and loadFromConfigFile().

◆ metricMapClassType

const mrpt::utils::TRuntimeClassId::Ptr mrpt::maps::TMetricMapInitializer::metricMapClassType
protected

Derived classes set this to CLASS_ID(< class >) where < class > is any CMetricMap derived class.

Definition at line 72 of file TMetricMapInitializer.h.

Referenced by dumpToTextStream(), and getMetricMapClassType().




Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: ae4571287 Thu Nov 23 00:06:53 2017 +0100 at dom oct 27 23:51:55 CET 2019