#include <mrpt/utils/CConfigFile.h>
Public Member Functions | |
CConfigFile (const std::string &fileName) | |
Constructor. | |
virtual | ~CConfigFile () |
Destructor. | |
virtual void | getAllSections (vector_string §ions) const |
Returns a list with all the section names. | |
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 | |
std::string | m_file |
The name of the file. | |
void_ptr_noncopy | m_ini |
The interface to the file:. | |
bool | m_modified |
If modified since load. |
The contents of the file will be modified by "write" operations in memory, and will be saved back to the file at the destructor, and only if at least one write operation has been applied.
Definition at line 47 of file CConfigFile.h.
mrpt::utils::CConfigFile::CConfigFile | ( | const std::string & | fileName | ) |
Constructor.
virtual mrpt::utils::CConfigFile::~CConfigFile | ( | ) | [virtual] |
Destructor.
virtual void mrpt::utils::CConfigFile::getAllSections | ( | vector_string & | sections | ) | const [virtual] |
std::string mrpt::utils::CConfigFile::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.
std::exception | If the key name is not found and "failIfNotFound" is true. Otherwise the "defaultValue" is returned. |
Implements mrpt::utils::CConfigFileBase.
void mrpt::utils::CConfigFile::writeString | ( | const std::string & | section, | |
const std::string & | name, | |||
const std::string & | str | |||
) | [protected, virtual] |
std::string mrpt::utils::CConfigFile::m_file [private] |
bool mrpt::utils::CConfigFile::m_modified [private] |
Page generated by Doxygen 1.5.7.1 for MRPT 0.7.1 SVN: at Mon Aug 17 22:58:25 EDT 2009 |