This is a virtual base class for sets of options than can be loaded from and/or saved to configuration plain-text files.
Definition at line 30 of file CLoadableOptions.h.
#include <mrpt/utils/CLoadableOptions.h>
Inherited by mrpt::bayes::CParticleFilter::TParticleFilterOptions, mrpt::bayes::TKF_options, mrpt::graphslam::deciders::CFixedIntervalsNRD< GRAPH_T >::TParams, mrpt::graphslam::deciders::CICPCriteriaERD< GRAPH_T >::TParams, mrpt::graphslam::deciders::CICPCriteriaNRD< GRAPH_T >::TParams, mrpt::graphslam::deciders::CIncrementalNodeRegistrationDecider< GRAPH_T >::TParams, mrpt::graphslam::deciders::CLoopCloserERD< GRAPH_T >::TLaserParams, mrpt::graphslam::deciders::CLoopCloserERD< GRAPH_T >::TLoopClosureParams, mrpt::graphslam::deciders::CRangeScanOps< GRAPH_T >::TParams, mrpt::graphslam::optimizers::CLevMarqGSO< GRAPH_T >::GraphVisualizationParams, mrpt::graphslam::optimizers::CLevMarqGSO< GRAPH_T >::OptimizationParams, mrpt::graphslam::TSlidingWindow, mrpt::graphslam::TUncertaintyPath< GRAPH_T >, mrpt::hmtslam::CHMTSLAM::TOptions, mrpt::hmtslam::CTopLCDetector_FabMap::TOptions, mrpt::hmtslam::CTopLCDetector_GridMatching::TOptions, mrpt::maps::CBeaconMap::TInsertionOptions, mrpt::maps::CBeaconMap::TLikelihoodOptions, mrpt::maps::CColouredPointsMap::TColourOptions, mrpt::maps::CGasConcentrationGridMap2D::TInsertionOptions, mrpt::maps::CHeightGridMap2D::TInsertionOptions, mrpt::maps::CHeightGridMap2D_MRF::TInsertionOptions, mrpt::maps::CLandmarksMap::TInsertionOptions, mrpt::maps::CLandmarksMap::TLikelihoodOptions, mrpt::maps::CMultiMetricMapPDF::TPredictionParams, mrpt::maps::COccupancyGridMap2D::TInsertionOptions, mrpt::maps::COccupancyGridMap2D::TLikelihoodOptions, mrpt::maps::COctoMapBase< OCTREE, OCTREE_NODE >::TInsertionOptions, mrpt::maps::COctoMapBase< OCTREE, OCTREE_NODE >::TLikelihoodOptions, mrpt::maps::CPointCloudFilterByDistance::TOptions, mrpt::maps::CPointsMap::TInsertionOptions, mrpt::maps::CPointsMap::TLikelihoodOptions, mrpt::maps::CRandomFieldGridMap3D::TInsertionOptions, mrpt::maps::CReflectivityGridMap2D::TInsertionOptions, mrpt::maps::CWirelessPowerGridMap2D::TInsertionOptions, mrpt::maps::TMapGenericParams, mrpt::maps::TMetricMapInitializer, mrpt::maps::TSetOfMetricMapInitializers, mrpt::nav::CAbstractNavigator::TAbstractNavigatorParams, mrpt::nav::CAbstractPTGBasedReactive::TAbstractPTGNavigatorParams, mrpt::nav::CHolonomicFullEval::TOptions, mrpt::nav::CHolonomicND::TOptions, mrpt::nav::CHolonomicVFF::TOptions, mrpt::nav::CMultiObjectiveMotionOptimizerBase::TParamsBase, mrpt::nav::CParameterizedTrajectoryGenerator, mrpt::nav::CReactiveNavigationSystem::TReactiveNavigatorParams, mrpt::nav::CWaypointsNavigator::TWaypointsNavigatorParams, mrpt::slam::CGridMapAligner::TConfigParams, mrpt::slam::CICP::TConfigParams, mrpt::slam::CIncrementalMapPartitioner::TOptions, mrpt::slam::CMetricMapBuilderICP::TConfigParams, mrpt::slam::CMetricMapBuilderRBPF::TConstructionOptions, mrpt::slam::CRangeBearingKFSLAM2D::TOptions, mrpt::slam::CRangeBearingKFSLAM::TOptions, mrpt::slam::TKLDParams, mrpt::vision::CCamModel, mrpt::vision::CFeatureExtraction::TOptions, mrpt::vision::TMatchingOptions, mrpt::vision::TMultiResDescMatchOptions, mrpt::vision::TMultiResDescOptions, and mrpt::vision::TStereoSystemParams.
Public Member Functions | |
virtual void | loadFromConfigFile (const mrpt::utils::CConfigFileBase &source, const std::string §ion)=0 |
This method load the options from a ".ini"-like file or memory-stored string list. More... | |
void | loadFromConfigFileName (const std::string &config_file, const std::string §ion) |
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 §ion) 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 §ion) 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... | |
virtual void | dumpToTextStream (mrpt::utils::CStream &out) const |
This method should clearly display all the contents of the structure in textual form, sending it to a CStream. More... | |
virtual | ~CLoadableOptions () |
Virtual destructor. More... | |
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) |
|
inlinevirtual |
Virtual destructor.
Definition at line 97 of file CLoadableOptions.h.
void CLoadableOptions::dumpToConsole | ( | ) | const |
Just like dumpToTextStream() but sending the text to the console (std::cout)
Definition at line 44 of file CLoadableOptions.cpp.
References dumpToTextStream(), and loadable_opts_my_cout.
Referenced by mrpt::hmtslam::CTopLCDetector_GridMatching::computeTopologicalObservationModel(), and mrpt::graphslam::optimizers::CLevMarqGSO< GRAPH_T >::printParams().
|
virtual |
This method should clearly display all the contents of the structure in textual form, sending it to a CStream.
The default implementation in this base class relies on saveToConfigFile() to generate a plain text representation of all the parameters.
Reimplemented in mrpt::vision::TMultiResDescOptions, mrpt::vision::TMultiResDescMatchOptions, mrpt::maps::COccupancyGridMap2D::TLikelihoodOptions, mrpt::maps::COccupancyGridMap2D::TInsertionOptions, mrpt::graphslam::deciders::CLoopCloserERD< GRAPH_T >::TLoopClosureParams, mrpt::vision::TMatchingOptions, mrpt::graphslam::deciders::CLoopCloserERD< GRAPH_T >::TLaserParams, mrpt::hmtslam::CHMTSLAM::TOptions, mrpt::maps::CLandmarksMap::TLikelihoodOptions, mrpt::maps::TSetOfMetricMapInitializers, mrpt::maps::CPointsMap::TLikelihoodOptions, mrpt::maps::CColouredPointsMap::TColourOptions, mrpt::vision::TStereoSystemParams, mrpt::maps::COctoMapBase< OCTREE, OCTREE_NODE >::TLikelihoodOptions, mrpt::maps::CLandmarksMap::TInsertionOptions, mrpt::graphslam::optimizers::CLevMarqGSO< GRAPH_T >::GraphVisualizationParams, mrpt::maps::CPointsMap::TInsertionOptions, mrpt::graphslam::deciders::CICPCriteriaNRD< GRAPH_T >::TParams, mrpt::graphslam::optimizers::CLevMarqGSO< GRAPH_T >::OptimizationParams, mrpt::slam::CRangeBearingKFSLAM::TOptions, mrpt::graphslam::deciders::CICPCriteriaERD< GRAPH_T >::TParams, mrpt::graphslam::deciders::CRangeScanOps< GRAPH_T >::TParams, mrpt::maps::CBeaconMap::TInsertionOptions, mrpt::maps::CRandomFieldGridMap3D::TInsertionOptions, mrpt::graphslam::deciders::CFixedIntervalsNRD< GRAPH_T >::TParams, mrpt::maps::CMultiMetricMapPDF::TPredictionParams, mrpt::maps::CBeaconMap::TLikelihoodOptions, mrpt::slam::CRangeBearingKFSLAM2D::TOptions, mrpt::maps::COctoMapBase< OCTREE, OCTREE_NODE >::TInsertionOptions, mrpt::maps::CHeightGridMap2D::TInsertionOptions, mrpt::maps::TMapGenericParams, mrpt::vision::CFeatureExtraction::TOptions, mrpt::graphslam::deciders::CIncrementalNodeRegistrationDecider< GRAPH_T >::TParams, mrpt::bayes::TKF_options, mrpt::slam::CMetricMapBuilderRBPF::TConstructionOptions, mrpt::graphslam::TSlidingWindow, mrpt::slam::CGridMapAligner::TConfigParams, mrpt::slam::CICP::TConfigParams, mrpt::maps::CReflectivityGridMap2D::TInsertionOptions, mrpt::graphslam::TUncertaintyPath< GRAPH_T >, mrpt::hmtslam::CTopLCDetector_GridMatching::TOptions, mrpt::hmtslam::CTopLCDetector_FabMap::TOptions, mrpt::maps::CHeightGridMap2D_MRF::TInsertionOptions, mrpt::maps::CGasConcentrationGridMap2D::TInsertionOptions, mrpt::maps::CWirelessPowerGridMap2D::TInsertionOptions, mrpt::slam::CIncrementalMapPartitioner::TOptions, mrpt::maps::TMetricMapInitializer, mrpt::slam::CMetricMapBuilderICP::TConfigParams, mrpt::vision::CCamModel, and mrpt::slam::TKLDParams.
Definition at line 83 of file CLoadableOptions.cpp.
References mrpt::utils::CConfigFileMemory::getContent(), mrpt::utils::CStream::printf(), and saveToConfigFile().
Referenced by dumpToConsole().
Definition at line 65 of file CLoadableOptions.cpp.
References LOADABLEOPTS_COLUMN_WIDTH, and mrpt::utils::CStream::printf().
|
staticprotected |
Definition at line 59 of file CLoadableOptions.cpp.
References LOADABLEOPTS_COLUMN_WIDTH, and mrpt::utils::CStream::printf().
|
staticprotected |
Definition at line 54 of file CLoadableOptions.cpp.
References LOADABLEOPTS_COLUMN_WIDTH, and mrpt::utils::CStream::printf().
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().
|
staticprotected |
Definition at line 71 of file CLoadableOptions.cpp.
References LOADABLEOPTS_COLUMN_WIDTH, and mrpt::utils::CStream::printf().
|
pure virtual |
This method load the options from a ".ini"-like file or memory-stored string list.
Only those parameters found in the given "section" and having the same name that the variable are loaded. Those not found in the file will stay with their previous values (usually the default values loaded at initialization). An example of an ".ini" file:
Implemented in mrpt::vision::TMultiResDescOptions, mrpt::vision::TMultiResDescMatchOptions, mrpt::maps::COccupancyGridMap2D::TLikelihoodOptions, mrpt::maps::COccupancyGridMap2D::TInsertionOptions, mrpt::graphslam::deciders::CLoopCloserERD< GRAPH_T >::TLoopClosureParams, mrpt::vision::TMatchingOptions, mrpt::graphslam::deciders::CLoopCloserERD< GRAPH_T >::TLaserParams, mrpt::hmtslam::CHMTSLAM::TOptions, mrpt::nav::CParameterizedTrajectoryGenerator, mrpt::maps::CLandmarksMap::TLikelihoodOptions, mrpt::maps::TSetOfMetricMapInitializers, mrpt::maps::CPointsMap::TLikelihoodOptions, mrpt::maps::CColouredPointsMap::TColourOptions, mrpt::vision::TStereoSystemParams, mrpt::maps::COctoMapBase< OCTREE, OCTREE_NODE >::TLikelihoodOptions, mrpt::maps::CLandmarksMap::TInsertionOptions, mrpt::nav::CAbstractPTGBasedReactive::TAbstractPTGNavigatorParams, mrpt::nav::CAbstractNavigator::TAbstractNavigatorParams, mrpt::graphslam::optimizers::CLevMarqGSO< GRAPH_T >::GraphVisualizationParams, mrpt::maps::CPointsMap::TInsertionOptions, mrpt::graphslam::deciders::CICPCriteriaNRD< GRAPH_T >::TParams, mrpt::graphslam::optimizers::CLevMarqGSO< GRAPH_T >::OptimizationParams, mrpt::slam::CRangeBearingKFSLAM::TOptions, mrpt::graphslam::deciders::CICPCriteriaERD< GRAPH_T >::TParams, mrpt::graphslam::deciders::CRangeScanOps< GRAPH_T >::TParams, mrpt::maps::CBeaconMap::TInsertionOptions, mrpt::graphslam::deciders::CFixedIntervalsNRD< GRAPH_T >::TParams, mrpt::maps::CRandomFieldGridMap3D::TInsertionOptions, mrpt::nav::CPTG_DiffDrive_CollisionGridBased, mrpt::nav::CWaypointsNavigator::TWaypointsNavigatorParams, mrpt::maps::CMultiMetricMapPDF::TPredictionParams, mrpt::maps::CBeaconMap::TLikelihoodOptions, mrpt::slam::CRangeBearingKFSLAM2D::TOptions, mrpt::nav::CHolonomicFullEval::TOptions, mrpt::bayes::CParticleFilter::TParticleFilterOptions, mrpt::nav::CReactiveNavigationSystem::TReactiveNavigatorParams, mrpt::nav::CHolonomicND::TOptions, mrpt::maps::COctoMapBase< OCTREE, OCTREE_NODE >::TInsertionOptions, mrpt::maps::CHeightGridMap2D::TInsertionOptions, mrpt::maps::TMapGenericParams, mrpt::vision::CFeatureExtraction::TOptions, mrpt::graphslam::deciders::CIncrementalNodeRegistrationDecider< GRAPH_T >::TParams, mrpt::slam::CMetricMapBuilderRBPF::TConstructionOptions, mrpt::graphslam::TSlidingWindow, mrpt::slam::CGridMapAligner::TConfigParams, mrpt::nav::CMultiObjectiveMotionOptimizerBase::TParamsBase, mrpt::slam::CICP::TConfigParams, mrpt::maps::CReflectivityGridMap2D::TInsertionOptions, mrpt::nav::CHolonomicVFF::TOptions, mrpt::graphslam::TUncertaintyPath< GRAPH_T >, mrpt::bayes::TKF_options, mrpt::hmtslam::CTopLCDetector_GridMatching::TOptions, mrpt::maps::CPointCloudFilterByDistance::TOptions, mrpt::hmtslam::CTopLCDetector_FabMap::TOptions, mrpt::maps::CHeightGridMap2D_MRF::TInsertionOptions, mrpt::maps::CGasConcentrationGridMap2D::TInsertionOptions, mrpt::maps::CWirelessPowerGridMap2D::TInsertionOptions, mrpt::slam::CIncrementalMapPartitioner::TOptions, mrpt::nav::CPTG_DiffDrive_C, mrpt::maps::TMetricMapInitializer, mrpt::slam::CMetricMapBuilderICP::TConfigParams, mrpt::nav::CPTG_DiffDrive_alpha, mrpt::nav::CMultiObjMotionOpt_Scalarization::TParams, mrpt::vision::CCamModel, mrpt::nav::CPTG_DiffDrive_CC, mrpt::nav::CPTG_DiffDrive_CCS, mrpt::nav::CPTG_DiffDrive_CS, mrpt::nav::CPTG_Holo_Blend, and mrpt::slam::TKLDParams.
Referenced by loadFromConfigFileName().
void CLoadableOptions::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.
Definition at line 22 of file CLoadableOptions.cpp.
References loadFromConfigFile().
Referenced by mrpt::graphslam::optimizers::CLevMarqGSO< GRAPH_T >::loadParams().
|
virtual |
This method saves the options to a ".ini"-like file or memory-stored string list.
Reimplemented in mrpt::vision::TMultiResDescOptions, mrpt::vision::TMultiResDescMatchOptions, mrpt::nav::CPTG_RobotShape_Circular, mrpt::nav::CPTG_RobotShape_Polygonal, mrpt::nav::CParameterizedTrajectoryGenerator, mrpt::nav::CAbstractPTGBasedReactive::TAbstractPTGNavigatorParams, mrpt::nav::CAbstractNavigator::TAbstractNavigatorParams, mrpt::nav::CPTG_DiffDrive_CollisionGridBased, mrpt::nav::CWaypointsNavigator::TWaypointsNavigatorParams, mrpt::nav::CHolonomicFullEval::TOptions, mrpt::bayes::CParticleFilter::TParticleFilterOptions, mrpt::nav::CReactiveNavigationSystem::TReactiveNavigatorParams, mrpt::nav::CHolonomicND::TOptions, mrpt::nav::CMultiObjectiveMotionOptimizerBase::TParamsBase, mrpt::nav::CHolonomicVFF::TOptions, mrpt::maps::CPointCloudFilterByDistance::TOptions, mrpt::nav::CPTG_DiffDrive_C, mrpt::nav::CPTG_DiffDrive_alpha, mrpt::nav::CMultiObjMotionOpt_Scalarization::TParams, mrpt::nav::CPTG_DiffDrive_CC, mrpt::nav::CPTG_DiffDrive_CCS, mrpt::nav::CPTG_DiffDrive_CS, and mrpt::nav::CPTG_Holo_Blend.
Definition at line 29 of file CLoadableOptions.cpp.
References MRPT_UNUSED_PARAM.
Referenced by dumpToTextStream(), and saveToConfigFileName().
void CLoadableOptions::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.
Definition at line 37 of file CLoadableOptions.cpp.
References saveToConfigFile().
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 |