#ifndef __PROPERTY_HPP #define __PROPERTY_HPP class PropertyList { public: PropertyList(); ~PropertyList(); enum proptype { boolean, integer, string, error }; int insert(const char *propname, proptype type, const char *value); int queryValue(const char *propname, int maxbuf, char *buf) const; proptype queryType(const char *propname) const; int setValue(const char *propname, const char *value); int remove(const char *propname); int exists(const char *propname) const; private: struct entry { char *name; unsigned char namesum; proptype type; entry *prev,*next; union { int b; long i; char *s; } u; }; entry *first; static unsigned char sumname(const char *s); entry *find(const char *propname); const entry *find(const char *propname) const { return ((PropertyList*)this)->find(propname); } }; extern PropertyList GlobalPropertyList; #endif