Hash table

Hash table

Namespace: dmHashTable
Include: #include <dmsdk/dlib/hashtable.h>
STRUCTS
struct Iterator Iterator to the key/value pairs of a hash table
FUNCTIONS
void dmHashTable() hashtable
void dmHashTable16() Specialized hash table with uint16_t as key...
void dmHashTable32() Specialized hash table with uint32_t as key...
void dmHashTable64() Specialized hash table with uint64_t as key...
dmHashTable::Iterator GetIterator() Get an iterator for the key/value pairs

Functions

dmHashTable

void dmHashTable()

Hashtable with chaining for collision resolution, memcpy-copy semantics (POD types) and 32-bit indicies instead of pointers. (NUMA-friendly)

PARAMETERS


dmHashTable16

void dmHashTable16()

Specialized hash table with uint16_t as keys

PARAMETERS


dmHashTable32

void dmHashTable32()

Specialized hash table with uint32_t as keys

PARAMETERS


dmHashTable64

void dmHashTable64()

Specialized hash table with uint64_t as keys

PARAMETERS


GetIterator

dmHashTable::Iterator GetIterator()

Get an iterator for the key/value pairs

PARAMETERS

RETURNS

dmHashTable::Iterator the iterator

EXAMPLES

dmHashTable<dmhash_t, int>::Iterator iter = ht.GetIterator();
while(iter.Next())
{
    printf("%s: %d\n", dmHashReverseSafe64(iter.GetKey()), iter.GetValue());
}

Structs

Iterator

TYPE

struct Iterator

Iterator to the key/value pairs of a hash table

MEMBERS

GetKey()
GetValue()