#include <AsyncConfig.h>
[SECTION1] VALUE1=The value VALUE2="Hello, " "multi line " "value!" [SECTION2] VALUE1="Whatever you want"
#include <iostream> #include <string> #include <AsyncConfig.h> using namespace std; using namespace Async; int main(int argc, char **argv) { Config cfg; if (!cfg.open("test.cfg")) { cerr << "*** Error: Could not open config file test.cfg\n"; exit(1); } string value; if (cfg.getValue("SECTION1", "VALUE2", value)) { cout << ">>> value=" << value << endl; } else { cerr << "*** Error: Could not find config variable SECTION1/VALUE2\n"; exit(1); } }
Definition at line 134 of file AsyncConfig.h.
|
|
Default constuctor.
|
|
|
Destructor.
|
|
||||||||||||||||
|
Get the value of the given configuration variable.
|
|
|
Return the name of all the tags in the given section.
|
|
|
Open the given config file.
|
1.4.4