#include <INIFile.h>
Public Member Functions | |
| INIFile () | |
| INIFile (std::string fname, Pentagram::istring root) | |
| ~INIFile () | |
| bool | readConfigFile (std::string fname) |
| bool | readConfigString (std::string s) |
| void | clear (Pentagram::istring root) |
| std::string | dump () |
| void | write () |
| void | setReadonly () |
| bool | isReadonly () const |
| bool | hasSection (Pentagram::istring section) |
| bool | hasKey (Pentagram::istring key) |
| bool | checkRoot (Pentagram::istring key) |
| bool | value (Pentagram::istring key, std::string &ret) |
| bool | value (Pentagram::istring key, int &ret) |
| bool | value (Pentagram::istring key, bool &ret) |
| void | set (Pentagram::istring key, std::string value) |
| void | set (Pentagram::istring key, const char *value) |
| void | set (Pentagram::istring key, int value) |
| void | set (Pentagram::istring key, bool value) |
| void | unset (Pentagram::istring key) |
| void | listKeys (std::set< Pentagram::istring > &keys, Pentagram::istring section, bool longformat=false) |
| void | listSections (std::set< Pentagram::istring > §ions, bool longformat=false) |
| void | listKeyValues (std::map< Pentagram::istring, std::string > &keyvalues, Pentagram::istring section, bool longformat=false) |
Private Member Functions | |
| bool | stripRoot (Pentagram::istring &key) |
| Section * | getSection (Pentagram::istring section) |
| bool | splitKey (Pentagram::istring key, Pentagram::istring §ion, Pentagram::istring §ionkey) |
Private Attributes | |
| std::string | filename |
| Pentagram::istring | root |
| bool | is_file |
| bool | readonly |
| std::list< Section > | sections |
Classes | |
| struct | KeyValue |
| struct | Section |
Definition at line 25 of file INIFile.h.
| INIFile::INIFile | ( | ) |
Definition at line 28 of file INIFile.cpp.
| INIFile::INIFile | ( | std::string | fname, | |
| Pentagram::istring | root | |||
| ) |
| INIFile::~INIFile | ( | ) |
Definition at line 40 of file INIFile.cpp.
| bool INIFile::checkRoot | ( | Pentagram::istring | key | ) |
| void INIFile::clear | ( | Pentagram::istring | root | ) |
| string INIFile::dump | ( | ) |
| Section* INIFile::getSection | ( | Pentagram::istring | section | ) | [private] |
| bool INIFile::hasKey | ( | Pentagram::istring | key | ) |
| bool INIFile::hasSection | ( | Pentagram::istring | section | ) |
| bool INIFile::isReadonly | ( | ) | const [inline] |
| void INIFile::listKeys | ( | std::set< Pentagram::istring > & | keys, | |
| Pentagram::istring | section, | |||
| bool | longformat = false | |||
| ) |
| void INIFile::listKeyValues | ( | std::map< Pentagram::istring, std::string > & | keyvalues, | |
| Pentagram::istring | section, | |||
| bool | longformat = false | |||
| ) |
| void INIFile::listSections | ( | std::set< Pentagram::istring > & | sections, | |
| bool | longformat = false | |||
| ) |
| bool INIFile::readConfigFile | ( | std::string | fname | ) |
| bool INIFile::readConfigString | ( | std::string | s | ) |
read configuration from a string s. Lines must be separated by
| void INIFile::set | ( | Pentagram::istring | key, | |
| bool | value | |||
| ) |
| void INIFile::set | ( | Pentagram::istring | key, | |
| int | value | |||
| ) |
| void INIFile::set | ( | Pentagram::istring | key, | |
| const char * | value | |||
| ) |
| void INIFile::set | ( | Pentagram::istring | key, | |
| std::string | value | |||
| ) |
| void INIFile::setReadonly | ( | ) | [inline] |
| bool INIFile::splitKey | ( | Pentagram::istring | key, | |
| Pentagram::istring & | section, | |||
| Pentagram::istring & | sectionkey | |||
| ) | [private] |
| bool INIFile::stripRoot | ( | Pentagram::istring & | key | ) | [private] |
| void INIFile::unset | ( | Pentagram::istring | key | ) |
| bool INIFile::value | ( | Pentagram::istring | key, | |
| bool & | ret | |||
| ) |
| bool INIFile::value | ( | Pentagram::istring | key, | |
| int & | ret | |||
| ) |
| bool INIFile::value | ( | Pentagram::istring | key, | |
| std::string & | ret | |||
| ) |
| void INIFile::write | ( | ) |
Definition at line 302 of file INIFile.cpp.
References dump(), filename, FileSystem::get_instance(), is_file, readonly, ODataSource::write(), and FileSystem::WriteFile().
std::string INIFile::filename [private] |
bool INIFile::is_file [private] |
bool INIFile::readonly [private] |
Pentagram::istring INIFile::root [private] |
std::list<Section> INIFile::sections [private] |
1.4.7