34 #define HASH_EMPTY_NONE (SINT8)0
35 #define HASH_EMPTY_FREE (SINT8)1
36 #define HASH_EMPTY_DELETE (SINT8)2
44 Hashtable(
UINT32 (*func1)(
void *),
SINT32 (*func2)(
void *,
void *),
SINT32 capacity = 1000,
float loadFactor = 0.75);
56 hash = ((hash << 5) + hash) + c;
63 return strcmp((
char*)a,(
char*)b);
68 return ((*a_number) % 4294967295u);
72 return (*a_numberA == *a_numberB)? 0 : ((*a_numberA > *a_numberB)? 1 : -1);
93 return (*a_numberA == *a_numberB)? 0 : ((*a_numberA > *a_numberB)? 1 : -1);
99 bool containsKey(
void *key);
100 void *getValue(
void *key);
104 void* put(
void *key,
void *value);
105 void *remove(
void *key);
107 void clear(
SINT8 keyMode = HASH_EMPTY_NONE,
SINT8 valueMode = HASH_EMPTY_NONE);
111 struct Entry *getHashEntry(
void *key);
113 SINT32 m_capacity, m_count, m_threshold, m_modCount;
115 struct Entry **m_table;
116 UINT32 (*m_hashFunc)(
void *);
117 SINT32 (*m_compareFunc)(
void *,
void *);