#include <string_hasher.h>
Inheritance diagram for string_hasher:


Public Member Functions | |
| virtual u_int | hash (const void *key_data, int key_length) const |
| returns a value that can be used to index into a hash table. | |
| virtual hashing_algorithm * | clone () const |
| implements cloning of the algorithm object. | |
This uses a portion of the string's contents to create a hash value.
Definition at line 24 of file string_hasher.h.
| u_int string_hasher::hash | ( | const void * | key_data, | |
| int | key_length | |||
| ) | const [virtual] |
returns a value that can be used to index into a hash table.
the returned value is loosely based on the "key_data" and the "key_length" we are provided with. it is expected that the "key_data" really is a 'char' pointer whose length is "key_length" (including the zero terminator at the end).
Implements hashing_algorithm.
Definition at line 35 of file string_hasher.cpp.
References MAX_STRING_CHARS_USED, and minimum().
| hashing_algorithm * string_hasher::clone | ( | ) | const [virtual] |
implements cloning of the algorithm object.
Implements hashing_algorithm.
Definition at line 32 of file string_hasher.cpp.
1.5.1