#include <rtini.h>
Public Types | |
|
typedef StringMap< IniSection >::Iterator | Iterator |
Public Methods | |
| IniFile () | |
| Creates an empty IniFile. More... | |
| IniFile (const String &filename) | |
| Creates an IniFile and fills it with sections and entries from an INI file on your disk. More... | |
| bool | hasSection (const String &name) const |
| Checks if a section with the given name is present in this IniFile. | |
| IniSection & | getSection (const String &name) |
| Gets an IniSection by its name from this IniFile. More... | |
| const IniSection & | getSectionConst (const String &name) const |
| Gets an IniSection by its name from this IniFile. More... | |
| void | addSection (const String &name, const IniSection §ion) |
| Adds an IniSection to this IniFile. More... | |
| bool | removeSection (const String &name) |
| Removes the given section (by its name), if it is present. More... | |
| Iterator | begin () |
| Returns an iterator to the begin of the IniFile. More... | |
| Iterator | begin () const |
| Returns an unmodifyable iterator to the begin of the IniFile. | |
| bool | read (const String &filename) |
| Reads an INI file from your disk and inserts its contents into this IniFile. More... | |
| bool | write (const String &filename) |
| Writes the contents of this IniFile to your disk. More... | |
(This format is a well known text-mode configuration file format from the Windows world.) While the format of INI files varies with different Windows programs, for our purposes, its structure is as follows:
Strings.
|
|
Creates an empty IniFile. It will not contain any sections nor entries. |
|
|
Creates an IniFile and fills it with sections and entries from an INI file on your disk.
|
|
||||||||||||
|
Adds an IniSection to this IniFile. The section's contents will be copied over to the IniFile. If a section with the same name was already present in this IniFile, its contents will be discarded. |
|
|
Returns an iterator to the begin of the IniFile. You can use it to traverse all IniSections that are present in it. |
|
|
Gets an IniSection by its name from this IniFile. If the section does not yet exist, an empty section will be created and returned.
|
|
|
Gets an IniSection by its name from this IniFile. If the section does not yet exist, some nonsense value is returned; use hasSection() beforewards to check. |
|
|
Reads an INI file from your disk and inserts its contents into this IniFile.
|
|
|
Removes the given section (by its name), if it is present.
|
|
|
Writes the contents of this IniFile to your disk.
|