#include <swconfig.h>
Public Member Functions | |
SWConfig (const char *ifilename) | |
Constructor of SWConfig. | |
virtual void | Load () |
Load from disk Load the contzent from disk. | |
virtual void | Save () |
Save to disk Save the content of this config object to disk. | |
virtual void | augment (SWConfig &addFrom) |
Merges the values of addFrom. | |
virtual SWConfig & | operator+= (SWConfig &addFrom) |
virtual ConfigEntMap & | operator[] (const char *section) |
Get a section This is an easy way to get and store config values. | |
Public Attributes | |
std::string | filename |
The filename used by this SWConfig object. | |
SectionMap | Sections |
Map of available sections The map of available sections. | |
Private Member Functions | |
char | getline (FILE *fp, std::string &line) |
|
Constructor of SWConfig.
|
|
Merges the values of addFrom.
|
|
Load from disk Load the contzent from disk.
|
|
Get a section This is an easy way to get and store config values.
The following will work:
SWConfig config("/home/user/.setttings"); config["Colors"]["Background"] = "red"; |
|
Save to disk Save the content of this config object to disk.
|
|
The filename used by this SWConfig object.
|
|
Map of available sections The map of available sections.
|