Hasty Badger
Small UI library (a branch of Turbo Badger)
 All Classes Namespaces Functions Variables Enumerations Enumerator Friends Groups Pages
tb::TBHashTableOf< T > Class Template Reference

TBHashTableOf is a TBHashTable with the given class type as content. More...

#include <tb_hashtable.h>

Inheritance diagram for tb::TBHashTableOf< T >:
tb::TBHashTable

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

Detailed Description

template<class T>
class tb::TBHashTableOf< T >

TBHashTableOf is a TBHashTable with the given class type as content.

Member Function Documentation

template<class T>
virtual void tb::TBHashTableOf< T >::DeleteContent ( void *  )
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.


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