54 bool failIfNotFound =
false)
const override;
87 std::vector<std::string>& sections)
const override;
92 std::vector<std::string>& keys)
const override;
This class allows loading and storing values and vectors of different types from a configuration text...
This class allows loading and storing values and vectors of different types from "....
virtual void getAllSections(std::vector< std::string > §ions) const override
Returns a list with all the section names.
virtual ~CConfigFile()
Destructor.
std::string getAssociatedFile() const
Returns the file currently open by this object.
void writeString(const std::string §ion, const std::string &name, const std::string &str) override
A virtual method to write a generic string
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 discardSavingChanges()
Discard saving (current) changes to physical file upon destruction.
mrpt::pimpl< Impl > m_impl
void writeNow()
Dumps the changes to the physical configuration file now, not waiting until destruction.
virtual void getAllKeys(const std::string §ion, std::vector< std::string > &keys) const override
Returs a list with all the keys into a section.
CConfigFile()
Constructor, does not open any file.
std::string m_file
The name of the file.
bool m_modified
If modified since load.
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
GLsizei const GLchar ** string
spimpl::impl_ptr< T > pimpl