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 31 of file CLoadableOptions.h.
#include <mrpt/utils/CLoadableOptions.h>
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 91 of file CLoadableOptions.h.
void mrpt::utils::CLoadableOptions::dumpToConsole | ( | ) | const |
Just like dumpToTextStream() but sending the text to the console (std::cout)
|
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::hmtslam::CHMTSLAM::TOptions, mrpt::maps::COccupancyGridMap2D::TInsertionOptions, mrpt::vision::TMatchingOptions, mrpt::maps::TSetOfMetricMapInitializers, mrpt::maps::CLandmarksMap::TLikelihoodOptions, mrpt::maps::CColouredPointsMap::TColourOptions, mrpt::maps::CPointsMap::TLikelihoodOptions, mrpt::maps::CLandmarksMap::TInsertionOptions, mrpt::vision::TStereoSystemParams, mrpt::maps::CPointsMap::TInsertionOptions, mrpt::maps::COctoMapBase< OCTREE, OCTREE_NODE >::TLikelihoodOptions, mrpt::slam::CRangeBearingKFSLAM::TOptions, mrpt::maps::CBeaconMap::TInsertionOptions, mrpt::maps::CMultiMetricMapPDF::TPredictionParams, mrpt::maps::CBeaconMap::TLikelihoodOptions, mrpt::slam::CRangeBearingKFSLAM2D::TOptions, mrpt::maps::CHeightGridMap2D::TInsertionOptions, mrpt::maps::COctoMapBase< OCTREE, OCTREE_NODE >::TInsertionOptions, mrpt::bayes::CParticleFilter::TParticleFilterOptions, mrpt::slam::CGridMapAligner::TConfigParams, mrpt::bayes::TKF_options, mrpt::maps::CReflectivityGridMap2D::TInsertionOptions, mrpt::slam::CMetricMapBuilderRBPF::TConstructionOptions, mrpt::vision::CFeatureExtraction::TOptions, mrpt::maps::TMapGenericParams, mrpt::hmtslam::CTopLCDetector_GridMatching::TOptions, mrpt::hmtslam::CTopLCDetector_FabMap::TOptions, mrpt::maps::CGasConcentrationGridMap2D::TInsertionOptions, mrpt::slam::CICP::TConfigParams, mrpt::slam::CIncrementalMapPartitioner::TOptions, mrpt::maps::CHeightGridMap2D_MRF::TInsertionOptions, mrpt::maps::CWirelessPowerGridMap2D::TInsertionOptions, mrpt::maps::TMetricMapInitializer, mrpt::slam::CMetricMapBuilderICP::TConfigParams, mrpt::vision::CCamModel, and mrpt::slam::TKLDParams.
|
staticprotected |
|
staticprotected |
|
staticprotected |
|
staticprotected |
Used to print variable info from dumpToTextStream with the macro LOADABLEOPTS_DUMP_VAR.
|
staticprotected |
|
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::hmtslam::CHMTSLAM::TOptions, mrpt::maps::COccupancyGridMap2D::TInsertionOptions, mrpt::vision::TMatchingOptions, mrpt::maps::TSetOfMetricMapInitializers, mrpt::maps::CLandmarksMap::TLikelihoodOptions, mrpt::maps::CColouredPointsMap::TColourOptions, mrpt::maps::CPointsMap::TLikelihoodOptions, mrpt::maps::CLandmarksMap::TInsertionOptions, mrpt::vision::TStereoSystemParams, mrpt::maps::CPointsMap::TInsertionOptions, mrpt::maps::COctoMapBase< OCTREE, OCTREE_NODE >::TLikelihoodOptions, mrpt::slam::CRangeBearingKFSLAM::TOptions, mrpt::maps::CBeaconMap::TInsertionOptions, mrpt::maps::CMultiMetricMapPDF::TPredictionParams, mrpt::nav::CHolonomicND::TOptions, mrpt::maps::CBeaconMap::TLikelihoodOptions, mrpt::slam::CRangeBearingKFSLAM2D::TOptions, mrpt::maps::CHeightGridMap2D::TInsertionOptions, mrpt::nav::CHolonomicVFF::TOptions, mrpt::maps::COctoMapBase< OCTREE, OCTREE_NODE >::TInsertionOptions, mrpt::bayes::CParticleFilter::TParticleFilterOptions, mrpt::slam::CGridMapAligner::TConfigParams, mrpt::maps::CReflectivityGridMap2D::TInsertionOptions, mrpt::slam::CMetricMapBuilderRBPF::TConstructionOptions, mrpt::vision::CFeatureExtraction::TOptions, mrpt::maps::TMapGenericParams, mrpt::hmtslam::CTopLCDetector_GridMatching::TOptions, mrpt::bayes::TKF_options, mrpt::hmtslam::CTopLCDetector_FabMap::TOptions, mrpt::maps::CGasConcentrationGridMap2D::TInsertionOptions, mrpt::slam::CICP::TConfigParams, mrpt::slam::CIncrementalMapPartitioner::TOptions, mrpt::maps::CHeightGridMap2D_MRF::TInsertionOptions, mrpt::maps::CWirelessPowerGridMap2D::TInsertionOptions, mrpt::maps::TMetricMapInitializer, mrpt::slam::CMetricMapBuilderICP::TConfigParams, mrpt::vision::CCamModel, and mrpt::slam::TKLDParams.
void mrpt::utils::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.
|
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::CHolonomicND::TOptions, and mrpt::nav::CHolonomicVFF::TOptions.
void mrpt::utils::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.
Page generated by Doxygen 1.8.13 for MRPT 1.4.0 SVN: at Fri Mar 17 07:27:15 UTC 2017 |