9#ifndef CConfigFileMemory_H
10#define CConfigFileMemory_H
39 const std::string §ion,
40 const std::string &name,
41 const std::string &defaultStr,
64 void setContent( const
std::
string &str );
67 void getContent(
std::
string &str ) const;
70 inline
std::
string getContent()
const { std::string s;
getContent(s);
return s; }
This class allows loading and storing values and vectors of different types from a configuration text...
This class implements a config file-like interface over a memory-stored string list.
std::string readString(const std::string §ion, const std::string &name, const std::string &defaultStr, bool failIfNotFound=false) const MRPT_OVERRIDE
A virtual method to read a generic string.
void_ptr_noncopy m_ini
The IniFile object.
void getAllKeys(const std::string §ion, vector_string &keys) const MRPT_OVERRIDE
Returs a list with all the keys into a section.
void writeString(const std::string §ion, const std::string &name, const std::string &str) MRPT_OVERRIDE
A virtual method to write a generic string.
virtual ~CConfigFileMemory()
Destructor.
std::string getContent() const
Return the currnet contents of the virtual "config file".
void getAllSections(vector_string §ions) const MRPT_OVERRIDE
Returns a list with all the section names.
A class for storing a list of text lines.
std::vector< std::string > vector_string
A type for passing a vector of strings.
#define MRPT_OVERRIDE
C++11 "override" for virtuals:
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.