|
| Patrick's Programming Library Version 7.0.0 - Dokumentation |
Lesen und Schreiben von Konfigurationsdateien. Mehr ...
Öffentliche Methoden | |
| ConfigParser () | |
| ConfigParser (const String &filename) | |
| ConfigParser (FileObject &file) | |
| ~ConfigParser () | |
| void | add (const String §ion, const String &key, const String &value) |
| void | add (const String §ion, const String &key, const char *value) |
| void | add (const String &key, const String &value) |
| void | add (const String &key, const char *value) |
| void | add (const String &key, int value) |
| void | add (const String &key, bool value) |
| void | add (const String §ion, const String &key, int value) |
| void | add (const String §ion, const String &key, bool value) |
| void | copySection (AssocArray &target, const String §ion) const |
| Inhalt einer Sektion in einem AssocArray speichern. Mehr ... | |
| void | createSection (const String &name) |
| void | deleteKey (const String &key) |
| void | deleteKey (const String §ion, const String &key) |
| void | deleteSection (const String &name) |
| int | firstSection () |
| String | get (const String &key, const String &defaultvalue=String()) const |
| bool | getBool (const String &key, bool defaultvalue=false) const |
| bool | getBoolFromSection (const String §ion, const String &key, bool defaultvalue=false) const |
| bool | getFirst (String &key, String &value) |
| String | getFromSection (const String §ion, const String &key, const String &defaultvalue=String()) const |
| int | getInt (const String &key, int defaultvalue=0) const |
| int | getIntFromSection (const String §ion, const String &key, int defaultvalue=0) const |
| bool | getNext (String &key, String &value) |
| const String & | getSection (const String &name) const |
| Inhalt einer Sektion als String. Mehr ... | |
| const String & | getSectionName () const |
| const String & | getSeparator () const |
| void | load (const String &filename) |
| Konfiguration aus einer Datei laden. Mehr ... | |
| void | load (FileObject &file) |
| Konfiguration aus einem FileObject-Objekt laden. Mehr ... | |
| void | loadFromMemory (const void *buffer, size_t bytes) |
| Konfiguration aus dem Speicher laden. Mehr ... | |
| void | loadFromMemory (const ByteArrayPtr &ptr) |
| Konfiguration aus dem Speicher laden. Mehr ... | |
| void | loadFromString (const String &string) |
| Konfiguration aus einem String laden. Mehr ... | |
| int | nextSection () |
| void | print () const |
| Konfiguration auf STDOUT ausgeben. Mehr ... | |
| void | reset () |
| void | save (const String &filename) |
| Konfiguration in eine Datei speichern. Mehr ... | |
| void | save (FileObject &file) |
| Konfiguration in ein FileObject speichern. Mehr ... | |
| void | selectSection (const String §ion) |
| void | setSeparator (const String &string) |
| void | unload () |
Private Methoden | |
| void * | findSection (const String §ionname) const |
Private Attribute | |
| void * | first |
| AssocArray::Iterator | it |
| void * | last |
| void * | section |
| AssocArray | sections |
| String | separator |
| ppl7::ConfigParser::ConfigParser | ( | ) |
| ppl7::ConfigParser::ConfigParser | ( | const String & | filename | ) |
| ppl7::ConfigParser::ConfigParser | ( | FileObject & | file | ) |
| ppl7::ConfigParser::~ConfigParser | ( | ) |
| void ppl7::ConfigParser::add | ( | const String & | key, |
| const char * | value | ||
| ) |
| void ppl7::ConfigParser::add | ( | const String & | key, |
| int | value | ||
| ) |
| void ppl7::ConfigParser::add | ( | const String & | key, |
| bool | value | ||
| ) |
| void ppl7::ConfigParser::copySection | ( | AssocArray & | target, |
| const String & | section | ||
| ) | const |
| target | Assoziatives Array, in dem die Sektion gespeichert werden soll |
| section | Der Name der Sektion ohne Eckige Klammern |
| void ppl7::ConfigParser::createSection | ( | const String & | name | ) |
| void ppl7::ConfigParser::deleteKey | ( | const String & | key | ) |
| void ppl7::ConfigParser::deleteSection | ( | const String & | name | ) |
|
private |
| int ppl7::ConfigParser::firstSection | ( | ) |
| bool ppl7::ConfigParser::getBool | ( | const String & | key, |
| bool | defaultvalue = false |
||
| ) | const |
| bool ppl7::ConfigParser::getBoolFromSection | ( | const String & | section, |
| const String & | key, | ||
| bool | defaultvalue = false |
||
| ) | const |
| String ppl7::ConfigParser::getFromSection | ( | const String & | section, |
| const String & | key, | ||
| const String & | defaultvalue = String() |
||
| ) | const |
| int ppl7::ConfigParser::getInt | ( | const String & | key, |
| int | defaultvalue = 0 |
||
| ) | const |
| int ppl7::ConfigParser::getIntFromSection | ( | const String & | section, |
| const String & | key, | ||
| int | defaultvalue = 0 |
||
| ) | const |
| section | Der Name der Sektion ohne Eckige Klammern |
| const String & ppl7::ConfigParser::getSectionName | ( | ) | const |
| const String & ppl7::ConfigParser::getSeparator | ( | ) | const |
| void ppl7::ConfigParser::load | ( | const String & | filename | ) |
| filename | Dateiname |
| void ppl7::ConfigParser::load | ( | FileObject & | file | ) |
| file | Referenz auf eine FileObject-Klasse |
| File::FileNotOpenException | Wird geworfen, wenn das FileObject /p file keine geöffnete Datei enthält |
| Diverese | Es können alle Exceptions auftreten, File::gets werfen kann |
| void ppl7::ConfigParser::loadFromMemory | ( | const void * | buffer, |
| size_t | bytes | ||
| ) |
| buffer | Ein Pointer auf den Beginn des Speicherbereichs |
| bytes | Die Größe des Speicherbereichs |
| void ppl7::ConfigParser::loadFromMemory | ( | const ByteArrayPtr & | ptr | ) |
| ptr | Referenz auf ein ByteArray oder ByteArrayPtr Objekt |
| void ppl7::ConfigParser::loadFromString | ( | const String & | string | ) |
| int ppl7::ConfigParser::nextSection | ( | ) |
| void ppl7::ConfigParser::print | ( | ) | const |
| void ppl7::ConfigParser::reset | ( | ) |
| void ppl7::ConfigParser::save | ( | const String & | filename | ) |
filename gespeichert.| filename | Der Dateiname, unter dem die Konfiguration gespeichert werden soll |
| Diverese | Es können alle Exceptions auftreten, die File::open, File::puts und File::putsf werfen kann. |
| void ppl7::ConfigParser::save | ( | FileObject & | file | ) |
file gespeichert.| filename | Der Dateiname, unter dem die Konfiguration gespeichert werden soll |
| Diverese | Es können alle Exceptions auftreten, File::puts und File::putsf werfen kann. |
| File::FileNotOpenException | Wird geworfen, wenn das FileObject /p file keine geöffnete Datei enthält |
| void ppl7::ConfigParser::selectSection | ( | const String & | section | ) |
| void ppl7::ConfigParser::setSeparator | ( | const String & | string | ) |
| void ppl7::ConfigParser::unload | ( | ) |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |