Map< Key, Value, Sequence > Class Template Reference#include <tDictionary.h>
Inheritance diagram for Map< Key, Value, Sequence >: ![]() Detailed Description
A Map template class.
|
Public Types | |
typedef Parent::Pair | Pair |
typedef Pair | ValueType |
typedef Pair & | Reference |
typedef const Pair & | ConstReference |
typedef Parent::Iterator | Iterator |
typedef Parent::ConstIterator | ConstIterator |
typedef S32 | DifferenceType |
typedef U32 | SizeType |
Public Member Functions | |
Map () | |
~Map () | |
Map (const Map &p) | |
U32 | size () const |
Return the number of elements. | |
void | clear () |
Empty the Map. | |
bool | isEmpty () const |
Returns true if the map is empty. | |
Iterator | insert (const Key &key, const Value &) |
Insert the key value pair but don't allow duplicates. | |
void | erase (Iterator) |
Erase the given entry. | |
void | erase (const Key &key) |
Erase the key from the map. | |
Iterator | find (const Key &) |
Find entry for the given key. | |
ConstIterator | find (const Key &) const |
Find entry for the given key. | |
bool | contains (const Key &a) |
Iterator | begin () |
Iterator to first element. | |
ConstIterator | begin () const |
Iterator to first element. | |
Iterator | end () |
IIterator to last element + 1. | |
ConstIterator | end () const |
Iterator to last element + 1. | |
Value & | operator[] (const Key &) |
Index using the given key. If the key is not currently in the map it is added. | |
Private Types | |
typedef HashTable< Key, Value > | Parent |
Private Attributes | |
Sequence | mMap |
typedef HashTable<Key,Value> Map< Key, Value, Sequence >::Parent [private] |
typedef Parent::Pair Map< Key, Value, Sequence >::Pair |
typedef Pair Map< Key, Value, Sequence >::ValueType |
typedef Pair& Map< Key, Value, Sequence >::Reference |
typedef const Pair& Map< Key, Value, Sequence >::ConstReference |
typedef Parent::Iterator Map< Key, Value, Sequence >::Iterator |
typedef Parent::ConstIterator Map< Key, Value, Sequence >::ConstIterator |
typedef S32 Map< Key, Value, Sequence >::DifferenceType |
typedef U32 Map< Key, Value, Sequence >::SizeType |
Map< Key, Value, Sequence >::Map | ( | ) | [inline] |
Map< Key, Value, Sequence >::~Map | ( | ) | [inline] |
Map< Key, Value, Sequence >::Map | ( | const Map< Key, Value, Sequence > & | p | ) |
U32 Map< Key, Value, Sequence >::size | ( | ) | const [inline] |
Return the number of elements.
void Map< Key, Value, Sequence >::clear | ( | ) | [inline] |
Empty the Map.
bool Map< Key, Value, Sequence >::isEmpty | ( | ) | const [inline] |
Returns true if the map is empty.
Map< Key, Value, Sequence >::Iterator Map< Key, Value, Sequence >::insert | ( | const Key & | key, | |
const Value & | x | |||
) |
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().
void Map< Key, Value, Sequence >::erase | ( | Iterator | ) |
Erase the given entry.
void Map< Key, Value, Sequence >::erase | ( | const Key & | key | ) |
Erase the key from the map.
Map< Key, Value, Sequence >::Iterator Map< Key, Value, Sequence >::find | ( | const Key & | ) |
Find entry for the given key.
Map< Key, Value, Sequence >::ConstIterator Map< Key, Value, Sequence >::find | ( | const Key & | ) | const |
Find entry for the given key.
bool Map< Key, Value, Sequence >::contains | ( | const Key & | a | ) | [inline] |
Map< Key, Value, Sequence >::Iterator Map< Key, Value, Sequence >::begin | ( | ) | [inline] |
Iterator to first element.
Map< Key, Value, Sequence >::ConstIterator Map< Key, Value, Sequence >::begin | ( | ) | const [inline] |
Iterator to first element.
Map< Key, Value, Sequence >::Iterator Map< Key, Value, Sequence >::end | ( | ) | [inline] |
IIterator to last element + 1.
Map< Key, Value, Sequence >::ConstIterator Map< Key, Value, Sequence >::end | ( | ) | const [inline] |
Iterator to last element + 1.
Value & Map< Key, Value, Sequence >::operator[] | ( | const Key & | ) | [inline] |
Index using the given key. If the key is not currently in the map it is added.
Sequence Map< Key, Value, Sequence >::mMap [private] |