#include <lemon/bits/vector_map.h>
Inherits AlterationNotifier::ObserverBase.
Inheritance diagram for VectorMap:
Registry | The AlterationNotifier that will notify this map. | |
IdMap | The IdMap type of the graph items. | |
Value | The value type of the map. |
Public Types | |
typedef _Graph | Graph |
The graph type of the map. | |
typedef _Item | Key |
The key type of the map. | |
typedef AlterationNotifier< _Item > | Registry |
The id map type of the map. | |
typedef _Value | Value |
The value type of the map. | |
typedef VectorMap | Map |
The map type. | |
typedef Registry::ObserverBase | Parent |
The base class of the map. | |
typedef Container::reference | Reference |
The reference type of the map;. | |
typedef Container::pointer | Pointer |
The pointer type of the map;. | |
typedef const Value | ConstValue |
The const value type of the map. | |
typedef Container::const_reference | ConstReference |
The const reference type of the map;. | |
typedef Container::const_pointer | ConstPointer |
The pointer type of the map;. | |
Public Member Functions | |
VectorMap (const Graph &_g) | |
Constructor to attach the new map into the registry. | |
VectorMap (const Graph &_g, const Value &_v) | |
Constructor uses given value to initialize the map. | |
VectorMap & | operator= (const VectorMap ©) |
Reference | operator[] (const Key &key) |
The subcript operator. | |
ConstReference | operator[] (const Key &key) const |
The const subcript operator. | |
void | set (const Key &key, const Value &value) |
The setter function of the map. | |
void | add (const Key &key) |
Adds a new key to the map. | |
void | erase (const Key &) |
Erases a key from the map. | |
void | build () |
Buildes the map. | |
void | clear () |
Clear the map. |
|
It construates a map and attachs it into the registry. It adds all the items of the graph to the map. |
|
It construates a map uses a given value to initialize the map. It adds all the items of the graph to the map. |
|
Assign operator to copy a map of the same map type. |
|
The subscript operator. The map can be subscripted by the actual items of the graph. |
|
The const subscript operator. The map can be subscripted by the actual items of the graph. |
|
It the same as operator[](key) = value expression. |
|
It adds a new key to the map. It called by the observer registry and it overrides the add() member function of the observer base. Implements AlterationNotifier::ObserverBase. |
|
Erase a key from the map. It called by the observer registry and it overrides the erase() member function of the observer base. Implements AlterationNotifier::ObserverBase. |
|
It buildes the map. It called by the observer registry and it overrides the build() member function of the observer base. Implements AlterationNotifier::ObserverBase. |
|
It erase all items from the map. It called by the observer registry and it overrides the clear() member function of the observer base. Implements AlterationNotifier::ObserverBase. |