A hash table designed to be used for items with high quality 32-bit hash values. More...
#include <opennurbs_hash_table.h>
Public Member Functions | |
ON_Hash32Table () | |
~ON_Hash32Table () | |
bool | AddItem (ON__UINT32 hash32, class ON_Hash32TableItem *item) |
Adds an item to the hash table. More... | |
class ON_Hash32TableItem * | FirstItemWithHash (ON__UINT32 hash32) const |
class ON_Hash32TableItem * | FirstTableItem () const |
ON__UINT32 | HashTableSerialNumber () const |
bool | IsValid () const |
unsigned int | ItemCount () const |
class ON_Hash32TableItem * | NextItemWithHash (const class ON_Hash32TableItem *current_item) const |
class ON_Hash32TableItem * | NextTableItem (const ON_Hash32TableItem *item) const |
unsigned int | RemoveAllItems () |
Removes all hash table items. Caller is responsible for managing the item memory. More... | |
unsigned int | RemoveAllItems (class ON_FixedSizePool &fsp) |
Removes all hash table items. For each item memset(item,0,fsp.SizeofElement()) and fsp.ReturnElement(item) are called. More... | |
bool | RemoveItem (class ON_Hash32TableItem *item) |
Remove an item from the hash table. Caller is responsible for managing item memory. More... | |
A hash table designed to be used for items with high quality 32-bit hash values.
ON_Hash32Table::ON_Hash32Table | ( | ) |
ON_Hash32Table::~ON_Hash32Table | ( | ) |
bool ON_Hash32Table::AddItem | ( | ON__UINT32 | hash32, |
class ON_Hash32TableItem * | item | ||
) |
Adds an item to the hash table.
hash32 | [in] |
item | [in/out] |
class ON_Hash32TableItem* ON_Hash32Table::FirstItemWithHash | ( | ON__UINT32 | hash32 | ) | const |
hash32 | [in] |
This function is used to find the first element in the hash table with the specified hash32 falue. Use ON_Hash32TableItem.NextItemWithSameHash() to get the next item in the has table with the same hash value.
class ON_Hash32TableItem* ON_Hash32Table::FirstTableItem | ( | ) | const |
This function is used for iterating throught every element in the hash table.
ON__UINT32 ON_Hash32Table::HashTableSerialNumber | ( | ) | const |
bool ON_Hash32Table::IsValid | ( | ) | const |
unsigned int ON_Hash32Table::ItemCount | ( | ) | const |
class ON_Hash32TableItem* ON_Hash32Table::NextItemWithHash | ( | const class ON_Hash32TableItem * | current_item | ) | const |
class ON_Hash32TableItem* ON_Hash32Table::NextTableItem | ( | const ON_Hash32TableItem * | item | ) | const |
This function is used for iterating throught every element in the hash table.
unsigned int ON_Hash32Table::RemoveAllItems | ( | ) |
Removes all hash table items. Caller is responsible for managing the item memory.
unsigned int ON_Hash32Table::RemoveAllItems | ( | class ON_FixedSizePool & | fsp | ) |
Removes all hash table items. For each item memset(item,0,fsp.SizeofElement()) and fsp.ReturnElement(item) are called.
bool ON_Hash32Table::RemoveItem | ( | class ON_Hash32TableItem * | item | ) |
Remove an item from the hash table. Caller is responsible for managing item memory.
item | [in/out] If the item is removed, the has table serial number is set to zero. |