source:
trunk/gsdl/lib/cnfgable.cpp@
11329
Last change on this file since 11329 was 8727, checked in by , 20 years ago | |
---|---|
|
|
File size: 793 bytes |
Rev | Line | |
---|---|---|
[1860] | 1 | #if defined(GSDL_USE_OBJECTSPACE) |
2 | # include <ospace/std/iostream> | |
3 | # include <ospace/std/fstream> | |
4 | #elif defined(GSDL_USE_IOS_H) | |
5 | # include <iostream.h> | |
6 | # include <fstream.h> | |
7 | #else | |
8 | # include <iostream> | |
9 | # include <fstream> | |
10 | #endif | |
11 | ||
12 | #include "cnfgable.h" | |
13 | #include "cfgread.h" | |
14 | ||
[8727] | 15 | bool configurable::read_configfile (const text_t &filename) { |
[1860] | 16 | // read in the build configuration file |
17 | text_t key; | |
18 | text_tarray cfgline; | |
19 | char *cstr = filename.getcstr(); | |
20 | ifstream confin (cstr); | |
[8727] | 21 | delete []cstr; |
[1860] | 22 | |
23 | if (confin) { | |
24 | while (read_cfg_line(confin, cfgline) >= 0) { | |
25 | if (cfgline.size () >= 2) { | |
26 | key = cfgline[0]; | |
27 | cfgline.erase(cfgline.begin()); | |
28 | ||
29 | // configure the collection server | |
30 | this->configure (key, cfgline); | |
31 | } | |
32 | } | |
33 | confin.close (); | |
34 | return true; | |
35 | } | |
36 | return false; | |
37 | } |
Note:
See TracBrowser
for help on using the repository browser.