Hasty Badger
Small UI library (a branch of Turbo Badger)
|
TBHashTableOf is a TBHashTable with the given class type as content. More...
#include <tb_hashtable.h>
Public Member Functions | |
T * | Get (uint32_t key) const |
Public Member Functions inherited from tb::TBHashTable | |
void | RemoveAll () |
Remove all items without deleting the content. More... | |
void | DeleteAll () |
Remove all items and delete the content. More... | |
void * | Get (uint32_t key) const |
Get the content for the given key, or nullptr if not found. More... | |
bool | Add (uint32_t key, void *content) |
Add content with the given key. More... | |
void * | Remove (uint32_t key) |
Remove the content with the given key. More... | |
void | Delete (uint32_t key) |
Delete the content with the given key. More... | |
bool | Rehash (uint32_t num_buckets) |
Rehash the table so use the given number of buckets. More... | |
bool | NeedRehash () const |
Return true if the hashtable itself think it's time to rehash. More... | |
uint32_t | GetSuitableBucketsCount () const |
Get the number of buckets the hashtable itself thinks is suitable for the current number of items. More... | |
Protected Member Functions | |
virtual void | DeleteContent (void *content) |
Delete the content of a item. More... | |
TBHashTableOf is a TBHashTable with the given class type as content.
It will delete all content automaticallt on destruction.
|
inlineprotectedvirtual |
Delete the content of a item.
This is called if calling DeleteAll, and must be implemented in a subclass that knows about the content type.
Reimplemented from tb::TBHashTable.