#include <mcllib/MCIniSection.h>
Inheritance diagram for MCIniSection:
Public Member Functions | |
bool | exists (const MCString &key) const |
Return true if key exists in the ini section. | |
const MCString & | get (const MCString &key) const |
Get a value for given a key. | |
MCIniSection (const MCString §ionName) | |
Construct an ini section named sectionName. | |
MCIniSection () | |
Construct an empty unnamed ini section. | |
MCString & | operator[] (const MCString &key) |
Get a reference to the current value for a key. | |
void | set (const MCString &key, const MCString &value) |
Set a key/value pair in the ini section. |
Objects of this class are intended to be constructed by ini files rather than directly by the application.
Refer to MCIniFile for further information.
This class is intentionally not thread safe for performance reasons. To be thread safe, lock a mutex before accessing its member functions.
|
Get a value for given a key. If the key does not exist in the ini section then an exception is thrown. |
|
Get a reference to the current value for a key. If the key does not already exist in the ini section it will be created and a reference to the new (empty) value will be returned. This allows array-like access to the ini section to both get and set values. |
|
Set a key/value pair in the ini section. If key already exists in the ini section its current value (if any) is discarded and replaced with the new value. |