64template <
class T,
class K,
unsigned S>
74 unsigned char *p = (
unsigned char *)&k;
75 unsigned len =
sizeof(K);
78 idx ^= (idx << 1) ^ *p;
98template <
class T,
unsigned S>
103 unsigned keyIndex(keystring k)
107 idx = (idx << 1) ^ (
unsigned)*k;
114template <
class T,
class K,
unsigned S>
117template <
class T,
class K,
unsigned S>
120 T *obj = objIndex[keyIndex(key)];
122 if(key == obj->objKey)
129#ifdef CCXX_NAMESPACES
Used to create and manage a hash index of objects through a common type.
Definition objmap.h:65
T * objNext
Definition objmap.h:68
virtual unsigned keyIndex(K k)
Definition objmap.h:71
static T * getObject(keystring key)
Definition objmap.h:118
objMap(const K key)
Definition objmap.h:87
const K objKey
Definition objmap.h:69
static T * objIndex[S]
Definition objmap.h:67
unsigned getSize(void)
Definition objmap.h:84
Common and portable character string related functions.