HashMap
Engine/source/core/util/tDictionary.h
A HashMap template class.
Public Types
Private Attributes
Sequence
Public Functions
Detailed Description
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.
Private Types
typedef HashTable< Key, Value > Parent
Public Types
typedef Parent::ConstIterator const_iterator
typedef const Pair & ConstReference
typedef S32 DifferenceType
typedef Parent::Iterator iterator
typedef Parent::Pair Pair
typedef Pair & Reference
typedef U32 SizeType
typedef Pair ValueType
Private Attributes
Sequence mHashMap
Public Functions
HashMap()
HashMap(const HashMap & p)
~HashMap()
begin()
iterator to first element
begin()
iterator to first element
clear()
Empty the HashMap.
contains(const Key & a)
end()
IIterator to last element + 1.
end()
iterator to last element + 1
erase(const Key & key)
Erase the key from the map.
erase(iterator )
Erase the given entry.
find(const Key & )
Find entry for the given key.
find(const Key & )
Find entry for the given key.
insert(const Key & key, const Value & )
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().
isEmpty()
Returns true if the map is empty.
operator[](const Key & )
Index using the given key. If the key is not currently in the map it is added.
size()
Return the number of elements.