#include <stconfigfile.h>
Public Member Functions | |
StConfigFile () | |
bool | load (const StFile &file) |
bool | save (const StFile &file) |
StString | get (const StString §ion, const StString &key) |
void | set (const StString §ion, const StString &key, const StString &value) |
Private Member Functions | |
int | findSection (const StString &name) |
int | findKey (const StString &name, int sectionIndex) |
Private Attributes | |
StValueList< Section > | sections |
Classes | |
struct | Key |
struct | Section |
You can load a config file, change or add sections or key values, and save it.
StConfigFile::StConfigFile | ( | ) | [inline] |
int StConfigFile::findKey | ( | const StString & | name, | |
int | sectionIndex | |||
) | [private] |
int StConfigFile::findSection | ( | const StString & | name | ) | [private] |
section | the section which includes the key | |
key | the key whose value you want to read. |
bool StConfigFile::load | ( | const StFile & | file | ) |
Load a file to the list.
bool StConfigFile::save | ( | const StFile & | file | ) |
Save a list to the file.
Set the key's value in a given section to the list.
section | the section where you want to set the key's value. | |
key | the name of the key. | |
value | the key's value. |
StValueList<Section> StConfigFile::sections [private] |
List of sections which include list of keys.