This class implements a config file-like interface over a memory-stored string list.
Definition at line 45 of file CConfigFileMemory.h.
#include <mrpt/utils/CConfigFileMemory.h>
Public Member Functions | |
CConfigFileMemory (const utils::CStringList &stringList) | |
Constructor and initialize from a list of strings. | |
CConfigFileMemory (const std::string &str) | |
Constructor and initialize from string with the whole "config file". | |
CConfigFileMemory () | |
Empty constructor. | |
CConfigFileMemory (const CConfigFileMemory &o) | |
Copy constructor. | |
CConfigFileMemory & | operator= (const CConfigFileMemory &o) |
Copy operator. | |
void | setContent (const utils::CStringList &stringList) |
Changes the contents of the virtual "config file". | |
void | setContent (const std::string &str) |
Changes the contents of the virtual "config file". | |
void | getContent (std::string &str) const |
Return the currnet contents of the virtual "config file". | |
std::string | getContent () const |
Return the currnet contents of the virtual "config file". | |
virtual | ~CConfigFileMemory () |
Destructor. | |
virtual void | getAllSections (vector_string §ions) const |
Returns a list with all the section names. | |
virtual void | getAllKeys (const std::string section, vector_string &keys) const |
Returs a list with all the keys into a section. | |
Protected Member Functions | |
void | writeString (const std::string §ion, const std::string &name, const std::string &str) |
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 |
A virtual method to read a generic string. | |
Private Attributes | |
void_ptr_noncopy | m_ini |
The IniFile object. |
mrpt::utils::CConfigFileMemory::CConfigFileMemory | ( | const utils::CStringList & | stringList | ) |
Constructor and initialize from a list of strings.
mrpt::utils::CConfigFileMemory::CConfigFileMemory | ( | const std::string & | str | ) |
Constructor and initialize from string with the whole "config file".
mrpt::utils::CConfigFileMemory::CConfigFileMemory | ( | ) |
Empty constructor.
Upon construction, call any of the "setContent" method.
mrpt::utils::CConfigFileMemory::CConfigFileMemory | ( | const CConfigFileMemory & | o | ) |
Copy constructor.
virtual mrpt::utils::CConfigFileMemory::~CConfigFileMemory | ( | ) | [virtual] |
Destructor.
virtual void mrpt::utils::CConfigFileMemory::getAllKeys | ( | const std::string | section, |
vector_string & | keys | ||
) | const [virtual] |
Returs a list with all the keys into a section.
Implements mrpt::utils::CConfigFileBase.
virtual void mrpt::utils::CConfigFileMemory::getAllSections | ( | vector_string & | sections | ) | const [virtual] |
Returns a list with all the section names.
Implements mrpt::utils::CConfigFileBase.
void mrpt::utils::CConfigFileMemory::getContent | ( | std::string & | str | ) | const |
Return the currnet contents of the virtual "config file".
Referenced by mrpt::utils::TCamera::dumpAsText().
std::string mrpt::utils::CConfigFileMemory::getContent | ( | ) | const [inline] |
Return the currnet contents of the virtual "config file".
Definition at line 91 of file CConfigFileMemory.h.
References getContent().
Referenced by getContent().
CConfigFileMemory& mrpt::utils::CConfigFileMemory::operator= | ( | const CConfigFileMemory & | o | ) |
Copy operator.
std::string mrpt::utils::CConfigFileMemory::readString | ( | const std::string & | section, |
const std::string & | name, | ||
const std::string & | defaultStr, | ||
bool | failIfNotFound = false |
||
) | const [protected, virtual] |
A virtual method to read a generic string.
Implements mrpt::utils::CConfigFileBase.
void mrpt::utils::CConfigFileMemory::setContent | ( | const utils::CStringList & | stringList | ) |
Changes the contents of the virtual "config file".
void mrpt::utils::CConfigFileMemory::setContent | ( | const std::string & | str | ) |
Changes the contents of the virtual "config file".
void mrpt::utils::CConfigFileMemory::writeString | ( | const std::string & | section, |
const std::string & | name, | ||
const std::string & | str | ||
) | [protected, virtual] |
A virtual method to write a generic string.
Implements mrpt::utils::CConfigFileBase.
The IniFile object.
Definition at line 50 of file CConfigFileMemory.h.
Page generated by Doxygen 1.7.3 for MRPT 0.9.4 SVN: at Sat Mar 26 06:16:28 UTC 2011 |