Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

VectorMap Class Template Reference
[Graphmaps]

#include <lemon/vector_map.h>

Inheritance diagram for VectorMap:

Inheritance graph
[legend]
Collaboration diagram for VectorMap:

Collaboration graph
[legend]
List of all members.

Detailed Description

template<typename _Graph, typename _Item, typename _Value>
class lemon::VectorMap< _Graph, _Item, _Value >

The VectorMap template class is graph map structure what automatically updates the map when a key is added to or erased from the map. This map factory uses the allocators to implement the container functionality. This map factory uses the std::vector to implement the container function.

Parameters:
Registry The AlterationNotifier that will notify this map.
IdMap The IdMap type of the graph items.
Value The value type of the map.
Author:
Balazs Dezso

Definition at line 50 of file vector_map.h.

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.
VectorMapoperator= (const VectorMap &copy)
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.


Constructor & Destructor Documentation

VectorMap const Graph _g  )  [inline]
 

It construates a map and attachs it into the registry. It adds all the items of the graph to the map.

Definition at line 91 of file vector_map.h.

VectorMap const Graph _g,
const Value _v
[inline]
 

It construates a map uses a given value to initialize the map. It adds all the items of the graph to the map.

Definition at line 101 of file vector_map.h.


Member Function Documentation

VectorMap& operator= const VectorMap< _Graph, _Item, _Value > &  copy  )  [inline]
 

Assign operator to copy a map of the same map type.

Definition at line 119 of file vector_map.h.

Reference operator[] const Key key  )  [inline]
 

The subscript operator. The map can be subscripted by the actual items of the graph.

Definition at line 151 of file vector_map.h.

ConstReference operator[] const Key key  )  const [inline]
 

The const subscript operator. The map can be subscripted by the actual items of the graph.

Definition at line 160 of file vector_map.h.

void set const Key key,
const Value value
[inline]
 

It the same as operator[](key) = value expression.

Definition at line 170 of file vector_map.h.

void add const Key key  )  [inline]
 

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.

Definition at line 179 of file vector_map.h.

void erase const Key  )  [inline]
 

Erase a key from the map. It called by the observer registry and it overrides the erase() member function of the observer base.

Definition at line 190 of file vector_map.h.

void build  )  [inline, virtual]
 

It buildes the map. It called by the observer registry and it overrides the build() member function of the observer base.

Implements AlterationNotifier::ObserverBase.

Definition at line 197 of file vector_map.h.

void clear  )  [inline, virtual]
 

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.

Definition at line 205 of file vector_map.h.


The documentation for this class was generated from the following file:
Generated on Sat Mar 19 10:58:55 2005 for LEMON by  doxygen 1.4.1