#include <lemon/bits/array_map.h>
Inherits AlterationNotifier::ObserverBase.
Inherited by DefaultMap.
Inheritance diagram for ArrayMap:
The template parameter is the AlterationNotifier that the maps will belong to and the Value.
Public Types | |
typedef _Graph | Graph |
The graph type of the maps. | |
typedef _Item | Key |
The key type of the maps. | |
typedef Registry::ObserverBase | Parent |
The MapBase of the Map which imlements the core regisitry function. | |
typedef _Value | Value |
The value type of the map. | |
Public Member Functions | |
ArrayMap (const Graph &_g) | |
Graph and Registry initialized map constructor. | |
ArrayMap (const Graph &_g, const Value &_v) | |
It constrates a map and initialize all of the the map. | |
ArrayMap (const ArrayMap ©) | |
Constructor to copy a map of the same map type. | |
ArrayMap & | operator= (const ArrayMap ©) |
Assign operator to copy a map of the same map type. | |
virtual | ~ArrayMap () |
The destructor of the map. | |
Value & | operator[] (const Key &key) |
const Value & | operator[] (const Key &key) const |
void | set (const Key &key, const Value &val) |
void | add (const Key &key) |
Add a new key to the map. It called by the map registry. | |
void | erase (const Key &key) |
Erase a key from the map. It called by the map registry. |
|
The subscript operator. The map can be subscripted by the actual keys of the graph. |
|
The const subscript operator. The map can be subscripted by the actual keys of the graph. |
|
Setter function of the map. Equivalent with map[key] = val. This is a compatibility feature with the not dereferable maps. |