UFO: Alien Invasion
Loading...
Searching...
No Matches
hashTable_s Struct Reference

The hash table structure, contains an array of buckets being indexed by the hash function. More...

Collaboration diagram for hashTable_s:
Collaboration graph

Data Fields

hashBucket_stable [HASH_TABLE_SIZE]
hashTable_hash hash
hashTable_compare compare
bool ownsKeys
bool ownsValues
bool duplicateOverwrite
memPool_tkeyPool
memPool_tvaluePool
memPool_tinternalPool

Detailed Description

The hash table structure, contains an array of buckets being indexed by the hash function.

Definition at line 96 of file hashtable.cpp.

Field Documentation

◆ compare

hashTable_compare hashTable_s::compare

If true, the hash table creates a copy of the key.

Definition at line 102 of file hashtable.cpp.

Referenced by HASH_CloneTable(), HASH_Get(), HASH_Insert(), HASH_NewTable(), and HASH_Remove().

◆ duplicateOverwrite

bool hashTable_s::duplicateOverwrite

Memory pool used to allocate keys.

Definition at line 109 of file hashtable.cpp.

Referenced by HASH_CloneTable(), HASH_Insert(), and HASH_NewTable().

◆ hash

hashTable_hash hashTable_s::hash

The compare function for this table.

Definition at line 100 of file hashtable.cpp.

Referenced by _iterator_next(), HASH_CloneTable(), HASH_Get(), HASH_Insert(), HASH_NewTable(), and HASH_Remove().

◆ internalPool

memPool_t* hashTable_s::internalPool

Definition at line 115 of file hashtable.cpp.

Referenced by HASH_Insert(), and HASH_NewTable().

◆ keyPool

memPool_t* hashTable_s::keyPool

Memory pool used to duplicate item values, in case the table owns the values.

Definition at line 111 of file hashtable.cpp.

Referenced by HASH_Insert(), and HASH_NewTable().

◆ ownsKeys

bool hashTable_s::ownsKeys

If true, the hash table creates a copy of the value.

Definition at line 104 of file hashtable.cpp.

Referenced by HASH_CloneTable(), HASH_Insert(), HASH_NewTable(), and HASH_Remove().

◆ ownsValues

bool hashTable_s::ownsValues

If a (key,value) pair is inserted and there already is a (key,value) pair, then if this is set to true (the default), the value is overwritten by the new value, else the operation asserts.

Definition at line 106 of file hashtable.cpp.

Referenced by HASH_CloneTable(), HASH_Insert(), HASH_NewTable(), and HASH_Remove().

◆ table

hashBucket_s* hashTable_s::table[HASH_TABLE_SIZE]

< The initial array of buckets. The hash function for this table.

Definition at line 98 of file hashtable.cpp.

Referenced by _iterator_first(), _iterator_next(), HASH_Count(), HASH_Get(), HASH_Insert(), and HASH_Remove().

◆ valuePool

memPool_t* hashTable_s::valuePool

Memory pool used to allocate internal table structures, including the table structure.

Definition at line 113 of file hashtable.cpp.

Referenced by HASH_Insert(), and HASH_NewTable().


The documentation for this struct was generated from the following file: