#include <tmap.h>
Public Member Functions | |
Map () | |
Map (const Map< Key, T > &m) | |
virtual | ~Map () |
Iterator | begin () |
ConstIterator | begin () const |
Iterator | end () |
ConstIterator | end () const |
void | insert (const Key &key, const T &value) |
void | clear () |
uint | size () const |
bool | isEmpty () const |
bool | contains (const Key &key) const |
const T & | operator[] (const Key &key) const |
T & | operator[] (const Key &key) |
Map< Key, T > & | operator= (const Map< Key, T > &m) |
Protected Member Functions | |
void | detach () |
This implements a standard map container that associates a key with a value and has fast key-based lookups. This map is also implicitly shared making it suitable for pass-by-value usage.
|
Constructs an empty Map. |
|
Make a shallow, implicitly shared, copy of m. Because this is implicitly shared, this method is lightweight and suitable for pass-by-value usage. |
|
Destroys this instance of the Map. |
|
Returns an STL style iterator to the beginning of the map. See std::map::const_iterator for the semantics. |
|
Returns an STL style iterator to the beginning of the map. See std::map::iterator for the semantics. |
|
Removes all of the elements from elements from the map. This however will not delete pointers if the mapped type is a pointer type. |
|
Returns true if the map contains an instance of key. |
|
|
|
Returns an STL style iterator to the end of the map. See std::map::const_iterator for the semantics. |
|
Returns an STL style iterator to the end of the map. See std::map::iterator for the semantics. |
|
Inserts value under key in the map. If a value for key already exists it will be overwritten. |
|
Returns true if the map is empty.
|
|
Make a shallow, implicitly shared, copy of m. Because this is implicitly shared, this method is lightweight and suitable for pass-by-value usage. |
|
Returns a reference to the value associated with key.
|
|
Returns a reference to the value associated with key.
|
|
The number of elements in the map.
|