57 bool failIfNotFound =
false)
const override;
This class allows loading and storing values and vectors of different types from ".ini" files easily.
void discardSavingChanges()
Discard saving (current) changes to physical file upon destruction.
std::string getAssociatedFile() const
Returns the file currently open by this object.
This class allows loading and storing values and vectors of different types from a configuration text...
virtual ~CConfigFile()
Destructor.
std::vector< std::string > vector_string
A type for passing a vector of strings.
CConfigFile()
Constructor, does not open any file.
bool m_modified
If modified since load.
GLsizei const GLchar ** string
void writeString(const std::string §ion, const std::string &name, const std::string &str) override
A virtual method to write a generic string.
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
void setFileName(const std::string &fil_path)
Associate this object with the given file, so future read/write operations will be applied to that fi...
GLuint const GLchar * name
void writeNow()
Dumps the changes to the physical configuration file now, not waiting until destruction.
virtual void getAllKeys(const std::string §ion, vector_string &keys) const override
Returs a list with all the keys into a section.
std::string m_file
The name of the file.
virtual void getAllSections(vector_string §ions) const override
Returns a list with all the section names.
std::string readString(const std::string §ion, const std::string &name, const std::string &defaultStr, bool failIfNotFound=false) const override
A virtual method to read a generic string.
void_ptr_noncopy m_ini
The interface to the file: