Torque2D Reference
|
#include <hashTable.h>
Public Types | |
typedef Parent::Pair | Pair |
typedef Pair | ValueType |
typedef Pair & | Reference |
typedef const Pair & | ConstReference |
typedef Parent::iterator | iterator |
typedef Parent::const_iterator | const_iterator |
typedef S32 | DifferenceType |
typedef U32 | SizeType |
Public Member Functions | |
HashMap () | |
~HashMap () | |
HashMap (const HashMap &p) | |
U32 | size () const |
Return the number of elements. More... | |
void | clear () |
Empty the HashMap. More... | |
bool | isEmpty () const |
Returns true if the map is empty. More... | |
iterator | insert (const Key &key, const Value &) |
void | erase (iterator) |
Erase the given entry. More... | |
void | erase (const Key &key) |
Erase the key from the map. More... | |
iterator | find (const Key &) |
Find entry for the given key. More... | |
const_iterator | find (const Key &) const |
Find entry for the given key. More... | |
bool | contains (const Key &a) |
iterator | begin () |
iterator to first element More... | |
const_iterator | begin () const |
iterator to first element More... | |
iterator | end () |
IIterator to last element + 1. More... | |
const_iterator | end () const |
iterator to last element + 1 More... | |
Value & | operator[] (const Key &) |
Index using the given key. If the key is not currently in the map it is added. More... | |
A HashMap template class. The map class maps between a key and an associated value. Keys are unique. The hash table class is used as the default implementation so the the key must be hashable, see util/hash.h for details.
typedef Parent::const_iterator const_iterator |
typedef const Pair& ConstReference |
typedef S32 DifferenceType |
typedef Parent::iterator iterator |
typedef Parent::Pair Pair |
typedef U32 SizeType |
|
inline |
|
inline |
|
inline |
iterator to first element
|
inline |
Empty the HashMap.
|
inline |
|
inline |
iterator to last element + 1
void erase | ( | iterator | node | ) |
Erase the given entry.
void erase | ( | const Key & | key | ) |
Erase the key from the map.
const_iterator find | ( | const Key & | ) | const |
Find entry for the given key.
Insert the key value pair but don't allow duplicates. The map class does not allow duplicates keys. If the key already exists in the map the function will fail and return end().
|
inline |
Returns true if the map is empty.
|
inline |
Index using the given key. If the key is not currently in the map it is added.
|
inline |
Return the number of elements.