00001
00002
00003
00004
00005
00006
00007 #ifndef __WVHASH_H
00008 #define __WVHASH_H
00009
00010 #include "wvstring.h"
00011
00012
00013 unsigned WvHash(WvStringParm s);
00014 unsigned WvHash(const char *s);
00015 unsigned WvHash(const int &i);
00016 unsigned WvHash(const void *p);
00017
00018
00019
00020 template <class K>
00021 struct OpEqComp
00022 {
00023 static bool compare(const K *key1, const K *key2)
00024 { return *key1 == *key2; }
00025 };
00026
00027
00028
00029 template <class K>
00030 struct StrCaseComp
00031 {
00032 static bool compare(const K *key1, const K *key2)
00033 { return strcasecmp(*key1, *key2) == 0; }
00034 };
00035
00036 #endif // __WVHASH_H