/**
*/
class PropSet {
-private:
+protected:
enum { hashRoots=31 };
Property *props[hashRoots];
Property *enumnext;
int enumhash;
+ static unsigned int HashString(const char *s, size_t len) {
+ unsigned int ret = 0;
+ while (len--) {
+ ret <<= 4;
+ ret ^= *s;
+ s++;
+ }
+ return ret;
+ }
+ static bool IncludesVar(const char *value, const char *key);
public:
PropSet *superPS;
PropSet();
void SetMultiple(const char *s);
SString Get(const char *key);
SString GetExpanded(const char *key);
- SString Expand(const char *withVars);
+ SString Expand(const char *withVars, int maxExpands=100);
int GetInt(const char *key, int defaultValue=0);
SString GetWild(const char *keybase, const char *filename);
SString GetNewExpand(const char *keybase, const char *filename="");