#include <hashmap.h>
Public Methods | |
csHashMap (uint32 size=211) | |
Constructor. More... | |
virtual | ~csHashMap () |
Destructor. More... | |
void | Put (csHashKey key, csHashObject object) |
Put an object in this map. | |
csHashObject | Get (csHashKey key) const |
Get an object from this map. More... | |
void | DeleteAll (csHashKey key) |
Delete all objects from this map with a given key. | |
void | DeleteAll () |
Delete all objects from this map. | |
Friends | |
class | csHashIterator |
You can put elements in this map using a key. Keys must not be unique. If a key is not unique then you can iterate over all elements with the same key.
|
Constructor.
The parameter for the constructor is the initial size of the hashtable. The best sizes are prime. |
|
Destructor. The objects referenced too in this hash table will not be destroyed. |
|
Get an object from this map. Returns NULL if object is not there. If there are multiple elements with the same key then a random one will be returned. Use an iterator to iterate over all elements with the same key. |