source: other-projects/gs2-export-cdrom-installer/trunk/configFile.h@ 21709

Last change on this file since 21709 was 11664, checked in by mdewsnip, 18 years ago

Fixed the line endings... for real this time, I hope.

  • Property svn:keywords set to Author Date Id Revision
File size: 873 bytes
Line 
1#ifndef _CONFIG_H_
2#define _CONFIG_H_
3#include <string>
4
5// use the standard namespace
6#if !defined (GSDL_NAMESPACE_BROKEN)
7#if defined(GSDL_USE_OBJECTSPACE)
8using namespace ospace::std;
9#else
10using namespace std;
11#endif
12#endif
13
14#include <stdio.h>
15#include <string.h>
16
17#include <windows.h>
18
19typedef struct
20{
21 char label[32];
22 char data[64];
23} config_item;
24
25typedef struct
26{
27 int count;
28 config_item item[1];
29} config_str;
30
31class configureFile
32{
33private:
34 config_str *configstr;
35 bool valid;
36
37 bool scan(char *buffer, unsigned int &pos, unsigned int length);
38public:
39 configureFile(char *name);
40 char *filename(char *base);
41 bool put(char *label, char *value);
42 bool concat(char *label, char *buffer, unsigned int &space);
43 string getString(string label);
44 void get(char *label, char **to);
45 bool store(char *);
46 bool isValid();
47 ~configureFile();
48};
49#endif
Note: See TracBrowser for help on using the repository browser.