Lines Matching refs:key
17 char *key; member
23 void Update(const char *key, T value);
24 bool Remove(const char *key);
25 T Find(const char *key);
30 uint32_t HashFunction(const char *key);
74 delete[] ptr->key; in ~HashTable()
84 uint32_t HashTable<T>::HashFunction(const char *key) in HashFunction() argument
88 int len = strlen(key); in HashFunction()
89 for(int ii = 0; ii < len; ++key, ++ii) in HashFunction()
90 hash = ((hash << 5) + hash) + *key; in HashFunction()
96 void HashTable<T>::Update(const char *key, T value) in Update() argument
99 int len = strlen(key); in Update()
100 int pos = HashFunction(key) & mask_; in Update()
104 if (strcmp(ptr->key, key) == 0) { in Update()
114 ptr->key = new char[len + 1]; in Update()
115 strcpy(ptr->key, key); in Update()
125 bool HashTable<T>::Remove(const char *key) in Remove() argument
128 int len = strlen(key); in Remove()
129 int pos = HashFunction(key) & mask_; in Remove()
135 if (strcmp(ptr->key, key) == 0) { in Remove()
141 delete ptr->key; in Remove()
150 typename HashTable<T>::value_type HashTable<T>::Find(const char *key) in Find() argument
153 int pos = HashFunction(key) & mask_; in Find()
157 if (strcmp(ptr->key, key) == 0) in Find()