UFO: Alien Invasion
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
hashTable_s Struct Reference

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

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

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().

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().

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().

memPool_t* hashTable_s::internalPool

Definition at line 115 of file hashtable.cpp.

Referenced by HASH_Insert(), and HASH_NewTable().

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().

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().

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().

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().

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: