9 #ifndef CLoadableOptions_H 10 #define CLoadableOptions_H 21 class CConfigFileBase;
103 #define LOADABLEOPTS_DUMP_VAR(variableName, variableType) \ 105 dumpVar_##variableType( \ 106 out, #variableName, static_cast<variableType>(variableName)); \ 111 #define LOADABLEOPTS_DUMP_VAR_DEG(variableName) \ 114 out, #variableName, RAD2DEG(static_cast<double>(variableName))); \ 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.
static void dumpVar_int(CStream &out, const char *varName, int v)
Used to print variable info from dumpToTextStream with the macro LOADABLEOPTS_DUMP_VAR.
This class allows loading and storing values and vectors of different types from a configuration text...
This base class is used to provide a unified interface to files,memory buffers,..Please see the deriv...
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 ob...
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. ...
static void dumpVar_bool(CStream &out, const char *varName, bool v)
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 obje...
static void dumpVar_float(CStream &out, const char *varName, float v)
GLsizei const GLchar ** string
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
static void dumpVar_string(CStream &out, const char *varName, const std::string &v)
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.
GLsizei GLsizei GLchar * source
void dumpToConsole() const
Just like dumpToTextStream() but sending the text to the console (std::cout)
This is a virtual base class for sets of options than can be loaded from and/or saved to configuratio...
static void dumpVar_double(CStream &out, const char *varName, double v)
virtual ~CLoadableOptions()
Virtual destructor.