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 46 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. | |
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. | |
virtual void | saveToConfigFile (mrpt::utils::CConfigFileBase &source, const std::string §ion) |
This method saves the options to a ".ini"-like file or memory-stored string list. | |
void | saveToConfigFileName (const std::string &config_file, const std::string §ion) |
Behaves like saveToConfigFile, but you can pass directly a file name and a temporary CConfigFile object will be created automatically to save the file. | |
void | dumpToConsole () const |
This method must display clearly all the contents of the structure in textual form, sending it to a CStream. | |
virtual void | dumpToTextStream (CStream &out) const =0 |
This method must display clearly all the contents of the structure in textual form, sending it to a CStream. | |
virtual | ~CLoadableOptions () |
Virtual destructor. | |
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. | |
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) |
virtual mrpt::utils::CLoadableOptions::~CLoadableOptions | ( | ) | [inline, virtual] |
Virtual destructor.
Definition at line 111 of file CLoadableOptions.h.
void mrpt::utils::CLoadableOptions::dumpToConsole | ( | ) | const |
This method must display clearly all the contents of the structure in textual form, sending it to a CStream.
virtual void mrpt::utils::CLoadableOptions::dumpToTextStream | ( | CStream & | out | ) | const [pure virtual] |
This method must display clearly all the contents of the structure in textual form, sending it to a CStream.
Implemented in mrpt::bayes::CParticleFilter::TParticleFilterOptions, mrpt::bayes::TKF_options, mrpt::hmtslam::CHMTSLAM::TOptions, mrpt::hmtslam::CTopLCDetector_FabMap::TOptions, mrpt::hmtslam::CTopLCDetector_GridMatching::TOptions, mrpt::slam::CBeaconMap::TLikelihoodOptions, mrpt::slam::CBeaconMap::TInsertionOptions, mrpt::slam::CColouredPointsMap::TColourOptions, mrpt::slam::CGasConcentrationGridMap2D::TInsertionOptions, mrpt::slam::CHeightGridMap2D::TInsertionOptions, mrpt::slam::COccupancyGridMap2D::TInsertionOptions, mrpt::slam::COccupancyGridMap2D::TLikelihoodOptions, mrpt::slam::CPointsMap::TInsertionOptions, mrpt::slam::CPointsMap::TLikelihoodOptions, mrpt::reactivenav::CPRRTNavigator::TOptions, mrpt::slam::CGridMapAligner::TConfigParams, mrpt::slam::CICP::TConfigParams, mrpt::slam::CIncrementalMapPartitioner::TOptions, mrpt::slam::CMetricMapBuilderICP::TConfigParams, mrpt::slam::CMetricMapBuilderRBPF::TConstructionOptions, mrpt::slam::CMultiMetricMap::TOptions, mrpt::slam::TSetOfMetricMapInitializers, mrpt::slam::CMultiMetricMapPDF::TPredictionParams, mrpt::slam::CRangeBearingKFSLAM::TOptions, mrpt::slam::CRangeBearingKFSLAM2D::TOptions, mrpt::slam::TKLDParams, mrpt::slam::CLandmarksMap::TInsertionOptions, mrpt::slam::CLandmarksMap::TLikelihoodOptions, mrpt::vision::CCamModel, mrpt::vision::CFeatureExtraction::TOptions, mrpt::vision::TStereoSystemParams, mrpt::vision::TMatchingOptions, mrpt::vision::TMultiResDescMatchOptions, and mrpt::vision::TMultiResDescOptions.
static void mrpt::utils::CLoadableOptions::dumpVar_bool | ( | CStream & | out, | |
const char * | varName, | |||
bool | v | |||
) | [static, protected] |
static void mrpt::utils::CLoadableOptions::dumpVar_double | ( | CStream & | out, | |
const char * | varName, | |||
double | v | |||
) | [static, protected] |
static void mrpt::utils::CLoadableOptions::dumpVar_float | ( | CStream & | out, | |
const char * | varName, | |||
float | v | |||
) | [static, protected] |
static void mrpt::utils::CLoadableOptions::dumpVar_int | ( | CStream & | out, | |
const char * | varName, | |||
int | v | |||
) | [static, protected] |
Used to print variable info from dumpToTextStream with the macro LOADABLEOPTS_DUMP_VAR.
static void mrpt::utils::CLoadableOptions::dumpVar_string | ( | CStream & | out, | |
const char * | varName, | |||
const std::string & | v | |||
) | [static, protected] |
virtual void mrpt::utils::CLoadableOptions::loadFromConfigFile | ( | const mrpt::utils::CConfigFileBase & | source, | |
const std::string & | section | |||
) | [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:
[section] resolution=0.10 ; blah blah... modeSelection=1 ; 0=blah, 1=blah,...
Implemented in mrpt::bayes::CParticleFilter::TParticleFilterOptions, mrpt::bayes::TKF_options, mrpt::hmtslam::CHMTSLAM::TOptions, mrpt::hmtslam::CTopLCDetector_FabMap::TOptions, mrpt::hmtslam::CTopLCDetector_GridMatching::TOptions, mrpt::slam::CBeaconMap::TLikelihoodOptions, mrpt::slam::CBeaconMap::TInsertionOptions, mrpt::slam::CColouredPointsMap::TColourOptions, mrpt::slam::CGasConcentrationGridMap2D::TInsertionOptions, mrpt::slam::CHeightGridMap2D::TInsertionOptions, mrpt::slam::COccupancyGridMap2D::TInsertionOptions, mrpt::slam::COccupancyGridMap2D::TLikelihoodOptions, mrpt::slam::CPointsMap::TInsertionOptions, mrpt::slam::CPointsMap::TLikelihoodOptions, mrpt::reactivenav::CPRRTNavigator::TOptions, mrpt::slam::CGridMapAligner::TConfigParams, mrpt::slam::CICP::TConfigParams, mrpt::slam::CIncrementalMapPartitioner::TOptions, mrpt::slam::CMetricMapBuilderICP::TConfigParams, mrpt::slam::CMetricMapBuilderRBPF::TConstructionOptions, mrpt::slam::CMultiMetricMap::TOptions, mrpt::slam::TSetOfMetricMapInitializers, mrpt::slam::CMultiMetricMapPDF::TPredictionParams, mrpt::slam::CRangeBearingKFSLAM::TOptions, mrpt::slam::CRangeBearingKFSLAM2D::TOptions, mrpt::slam::TKLDParams, mrpt::slam::CLandmarksMap::TInsertionOptions, mrpt::slam::CLandmarksMap::TLikelihoodOptions, mrpt::vision::CCamModel, mrpt::vision::CFeatureExtraction::TOptions, mrpt::vision::TStereoSystemParams, mrpt::vision::TMatchingOptions, mrpt::vision::TMultiResDescMatchOptions, and mrpt::vision::TMultiResDescOptions.
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 void mrpt::utils::CLoadableOptions::saveToConfigFile | ( | mrpt::utils::CConfigFileBase & | source, | |
const std::string & | section | |||
) | [inline, virtual] |
This method saves the options to a ".ini"-like file or memory-stored string list.
Reimplemented in mrpt::vision::TMultiResDescMatchOptions, and mrpt::vision::TMultiResDescOptions.
Definition at line 86 of file CLoadableOptions.h.
References THROW_EXCEPTION.
void mrpt::utils::CLoadableOptions::saveToConfigFileName | ( | const std::string & | config_file, | |
const std::string & | section | |||
) |
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.7.1 for MRPT 0.9.4 SVN: at Mon Jan 10 23:33:19 UTC 2011 |