Main Page | Namespace List | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members

IniFile Overview

The IniFile class provides methods to deal (read/write) with configuration files consisting of several "sections" each of which holding an undefined number of key-/value-pairs like this:

    [section 1]
    key 1_1 = value 1_1
    key 1_2 = value 1_2

    [section 2]
    key 2_1 = value 2_1
    key 2_2 = value 2_2

    [section 3]
    key 3_1 = value 3_1

The class provides for methods to read/write such a file as well as adding/changing/deleting single entries or whole sections. Its use is straight forward:

    // ... other stuff
    IniFile config("/path/to/my/file");
    // read some data
    int i = 0;
    i = config.read("my int-section", "the integer key", i);
    long double d = 0.0;
    d = config.read("my dbl-section", "a double key", d);
    // ... and so on for other data types

    // work with the data

    // store some data
    d = 123.456;
    config.write("my dbl-section", "a double key", d);
    i = 12345;
    config.write("my int-section", "the integer key", i);
    // ... and so on for other data types
    config.save();
    // ... other stuff

ChangeLog

Author:
Matthias Watermann
See also:
dfg::IniFile
Generated on 12 Jul 2004 for project IniFile+ with
Doxygen 1.3.7 corrected by sed and HTMLtidy  -x-