|
Boost : |
From: ÖÜ·½ Frank Chow (fzhou_at_[hidden])
Date: 2004-11-23 20:56:16
For example, to connect different databases according to different requests, there are some options stored in a config file, like this:
[DB1]
server=172.16.21.1
database=dbname1
userid=someone1
password=xxxxxx
[DB2]
server=172.16.21.2
database=dbname2
userid=someone2
password=oooooo
i.e. with same key name in different sectors.
In Win32 API, this method is very handy:
// to get "server" in "[DB1]"
char buf[256];
GetPrivateProfileString (""DB1, "server", "", buf, sizeof(buf), "configfile.ini");
Is there a mechanism in "Program Options Library" to support this config file?
Or, does it intend to support?
Thanks!
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk