VectorMap Class Template Reference
[Tools to Make It Easier to Make Graph Maps]

#include <lemon/bits/vector_map.h>

Inherits AlterationNotifier::ObserverBase.

Inheritance diagram for VectorMap:

Inheritance 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 indates 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.
Item The item type of the graph items.
Value The value type of the map.
Author:
Balazs Dezso


Public Types

typedef _Graph Graph
 The graph type of the map.
typedef True ReferenceMapTag
 The reference map tag.
typedef _Item Key
 The key 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 (const VectorMap &_copy)
 Copy constructor.
virtual ~VectorMap ()
 Destrcutor.
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.

Protected Member Functions

virtual void add (const Key &key)
 Adds a new key to the map.
virtual void add (const std::vector< Key > &keys)
 Adds more new keys to the map.
virtual void erase (const Key &)
 Erase a key from the map.
virtual void erase (const std::vector< Key > &)
 Erase more keys from the map.
virtual void build ()
 Buildes the map.
virtual void clear ()
 Clear the map.


Constructor & Destructor Documentation

VectorMap const Graph _g  )  [inline]
 

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

VectorMap const Graph _g,
const Value _v
[inline]
 

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

VectorMap const VectorMap< _Graph, _Item, _Value > &  _copy  )  [inline]
 

Copy constructor.

virtual ~VectorMap  )  [inline, virtual]
 

Destructor.


Member Function Documentation

Reference operator[] const Key key  )  [inline]
 

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

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

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

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

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

virtual void add const Key key  )  [inline, protected, virtual]
 

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.

virtual void add const std::vector< Key > &  keys  )  [inline, protected, virtual]
 

It adds more new keys to the map. It called by the observer registry and it overrides the add() member function of the observer base.

Reimplemented from AlterationNotifier::ObserverBase.

virtual void erase const Key  )  [inline, protected, virtual]
 

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.

virtual void erase const std::vector< Key > &   )  [inline, protected, virtual]
 

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

Reimplemented from AlterationNotifier::ObserverBase.

virtual void build  )  [inline, protected, 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.

virtual void clear  )  [inline, protected, 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.


The documentation for this class was generated from the following file:
Generated on Fri Feb 3 18:43:02 2006 for LEMON by  doxygen 1.4.6