#include <TValHashSetT.hh>
Public Methods | |
| TValHashSetT () | |
| Constructs an empty hash set. | |
| TValHashSetT (const TValHashSetT< K, U > &set) | |
| Copy constructor. | |
| ~TValHashSetT () | |
| Destructor. | |
| void | Apply (void(*fn)(const K *, void *), void *d) |
| Applies the user defined function to every key in self. | |
| void | Clear () |
| Removes all keys from self. | |
| bool | Contains (const K &k) |
| Check if there exists a key in self that compares equal to a. | |
| int | Entries () |
| Query number of keys in self. | |
| bool | Insert (const K &k) |
| Insert a key to the collection. | |
| bool | Remove (const K &k) |
| Remove a key from the collection. | |
| void | Shrink (bool flag) |
| Enable or dissable shrinking of bucket array when keys are removed. | |
| TValHashSetT< K, U > & | operator= (const TValHashSetT< K, U > &set) |
| Assignment operator. | |
The class U should contain the static methods Hash and Equal to calculate the hash of K objects and to compare K objects for equality.
|
||||||||||||||||
|
Applies the user defined function to every key in self.
|
|
||||||||||
|
Check if there exists a key in self that compares equal to a.
|
|
|||||||||
|
Query number of keys in self.
|
|
||||||||||
|
Insert a key to the collection.
|
|
||||||||||
|
Remove a key from the collection.
|
|
||||||||||
|
Enable or dissable shrinking of bucket array when keys are removed. This saves memory but costs some CPU time. It is enabled by default.
|
1.3-rc2