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))); \
This class allows loading and storing values and vectors of different types from a configuration text...
This is a virtual base class for sets of options than can be loaded from and/or saved to configuratio...
void dumpToConsole() const
Just like dumpToTextStream() but sending the text to the console (std::cout)
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...
virtual void dumpToTextStream(mrpt::utils::CStream &out) const
This method should clearly display all the contents of the structure in textual form,...
static void dumpVar_int(CStream &out, const char *varName, int v)
Used to print variable info from dumpToTextStream with the macro LOADABLEOPTS_DUMP_VAR.
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 ~CLoadableOptions()
Virtual destructor.
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_float(CStream &out, const char *varName, float v)
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_string(CStream &out, const char *varName, const std::string &v)
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.
This base class is used to provide a unified interface to files,memory buffers,..Please see the deriv...
GLsizei const GLchar ** string
GLsizei GLsizei GLchar * source
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.