source: trunk/gsdl/lib/cnfgable.cpp@ 1860

Last change on this file since 1860 was 1860, checked in by cs025, 23 years ago

Included CORBA branch for first time

  • Property svn:keywords set to Author Date Id Revision
File size: 784 bytes
Line 
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
15bool configurable::read_configfile (text_t filename) {
16 // read in the build configuration file
17 text_t key;
18 text_tarray cfgline;
19 char *cstr = filename.getcstr();
20 ifstream confin (cstr);
21 delete cstr;
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.