#ifndef _CONFIG_H_ #define _CONFIG_H_ #include // use the standard namespace #if !defined (GSDL_NAMESPACE_BROKEN) #if defined(GSDL_USE_OBJECTSPACE) using namespace ospace::std; #else using namespace std; #endif #endif #include #include #include typedef struct { char label[32]; char data[64]; } config_item; typedef struct { int count; config_item item[1]; } config_str; class configureFile { private: config_str *configstr; bool valid; bool scan(char *buffer, unsigned int &pos, unsigned int length); public: configureFile(char *name); char *filename(char *base); bool put(char *label, char *value); bool concat(char *label, char *buffer, unsigned int &space); string getString(string label); void get(char *label, char **to); bool store(char *); bool isValid(); ~configureFile(); }; #endif