csHashMap Class Reference
This is a general hashmap. More...
#include <hashmap.h>
Inheritance diagram for csHashMap:

Public Methods | |
| csHashMap (unsigned int size=53) | |
| Constructor. | |
| virtual | ~csHashMap () |
| Destructor. | |
| void | Put (csHashKey key, csHashObject object) |
| Put an object in this map. | |
| csHashObject | Get (csHashKey key) const |
| Get an object from this map. | |
| void | Delete (csHashKey key, csHashObject object) |
| Delete the given key/object from the map. | |
| void | DeleteAll (csHashKey key) |
| Delete all objects from this map with a given key. | |
| void | DeleteAll () |
| Delete all objects from this map. | |
| void | DumpStats () |
| Dump statistics about bucket quality. | |
Detailed Description
This is a general hashmap.You can put elements in this map using a key. Deprecated. Use csHash or csGrowingHash instead. Keys must not be unique. If a key is not unique then you can iterate over all elements with the same key.
Definition at line 193 of file hashmap.h.
Constructor & Destructor Documentation
|
|
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. |
Member Function Documentation
|
||||||||||||
|
Delete the given key/object from the map. This function will only delete the object once. If multiple 'Put''s are done with the same object then this function will only delete one of them. |
|
|
Delete all objects from this map.
|
|
|
Delete all objects from this map with a given key.
|
|
|
Dump statistics about bucket quality.
|
|
|
Get an object from this map. Returns 0 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. Reimplemented in csHashMapReversible. Referenced by csHashMapReversible::Get(). |
|
||||||||||||
|
Put an object in this map. Use the csHashCompute() function to get a pseudo-unique numeric key from a string. |
The documentation for this class was generated from the following file:
- csutil/hashmap.h
Generated for Crystal Space by doxygen 1.2.18
