53 bool failIfNotFound =
false)
const override;
A wrapper for other CConfigFileBase-based objects that prefixes a given token to every key and/or sec...
std::string getKeyPrefix() const
CConfigFilePrefixer()
Unbound constructor: must bind this object to CConfigFileBase before usage with bind() and setPrefixe...
void setPrefixes(const std::string &prefix_sections, const std::string &prefix_keys)
Change the prefix for sections and keys.
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.
This class allows loading and storing values and vectors of different types from a configuration text...
virtual ~CConfigFilePrefixer()
std::vector< std::string > vector_string
A type for passing a vector of strings.
std::string getSectionPrefix() const
GLsizei const GLchar ** string
void getAllKeys(const std::string §ion, vector_string &keys) const override
Returs a list with all the keys into a section.
std::string m_prefix_keys
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
void writeString(const std::string §ion, const std::string &name, const std::string &str) override
A virtual method to write a generic string.
CConfigFileBase * getBoundConfigFileBase() const
Returns the currently-bounded config source, or nullptr if none.
std::string m_prefix_sections
CConfigFileBase * m_bound_object
The object we are wrapping.
void getAllSections(vector_string §ions) const override
Returns a list with all the section names.
GLuint const GLchar * name
void bind(const CConfigFileBase &o)
Make this object to wrap the given existing CConfigFileBase object.