Rhino C++ API
8.10
|
#include <opennurbs_hash_table.h>
Public Member Functions | |
ON_Hash32Table () | |
~ON_Hash32Table () | |
bool | AddItem (ON__UINT32 hash32, class ON_Hash32TableItem *item) |
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 () |
unsigned int | RemoveAllItems (class ON_FixedSizePool &fsp) |
bool | RemoveItem (class ON_Hash32TableItem *item) |
Description: 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 | ||
) |
Description: Adds an item to the hash table. Parameters: hash32 - [in] item - [in/out] Returns: The added item.
class ON_Hash32TableItem* ON_Hash32Table::FirstItemWithHash | ( | ON__UINT32 | hash32 | ) | const |
Returns: The first item in the hash table with hash = hash32. Parameters: hash32 - [in] Remarks: This function is used to find the first element in the hash table with the specified hash32 failure. 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 |
Returns: The first item in the hash table. Remarks: This function is used for iterating throughout every element in the hash table.
ON__UINT32 ON_Hash32Table::HashTableSerialNumber | ( | ) | const |
bool ON_Hash32Table::IsValid | ( | ) | const |
unsigned int ON_Hash32Table::ItemCount | ( | ) | const |
Returns: Number of items in the hash table
class ON_Hash32TableItem* ON_Hash32Table::NextItemWithHash | ( | const class ON_Hash32TableItem * | current_item | ) | const |
class ON_Hash32TableItem* ON_Hash32Table::NextTableItem | ( | const ON_Hash32TableItem * | item | ) | const |
Returns: The next item in the hash table. Remarks: This function is used for iterating throughout every element in the hash table.
unsigned int ON_Hash32Table::RemoveAllItems | ( | ) |
Description: Removes all hash table items. Caller is responsible for managing the item memory.
unsigned int ON_Hash32Table::RemoveAllItems | ( | class ON_FixedSizePool & | fsp | ) |
Description: 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 | ) |
Description: Remove an item from the hash table. Caller is responsible for managing item memory. Parameters: item - [in/out] If the item is removed, the has table serial number is set to zero. Returns: The true if the item was removed.