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

InversableMap Class Template Reference
[Mutils]

#include <lemon/map_utils.h>

List of all members.


Detailed Description

template<typename _Graph, typename _Map>
class lemon::InversableMap< _Graph, _Map >

This type provides simple inversable map functions. The InversableMap wraps an arbitrary ReadWriteMap and if a key is setted to a new value then store it in the inverse map.
Parameters:
_Graph The graph type.
_Map The map to extend with inversable functionality.

Definition at line 41 of file map_utils.h.

Public Types

typedef _Map::Key Key
 The key type of InversableMap (Node, Edge, UndirEdge).
typedef _Map::Value Value
 The value type of the InversableMap.

Public Member Functions

 InversableMap (const Graph &graph)
 Constructor.
void set (const Key &key, const Value &val)
 The setter function of the map.
ConstReference operator[] (const Key &key) const
 The getter function of the map.
virtual void add (const Key &key)
 Add a new key to the map.
virtual void erase (const Key &key)
 Erase the key from the map.
virtual void clear ()
 Clear the keys from the map and inverse map.
const InverseMap & inverse () const
 It gives back the just readeable inverse map.


Constructor & Destructor Documentation

InversableMap const Graph &  graph  )  [inline]
 

Construct a new InversableMap for the graph.

Definition at line 59 of file map_utils.h.


Member Function Documentation

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

It sets the map and the inverse map to given key-value pair.

Definition at line 64 of file map_utils.h.

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

It gives back the value associated with the key.

Definition at line 77 of file map_utils.h.

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

Add a new key to the map. It is called by the AlterationNotifier.

Definition at line 85 of file map_utils.h.

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

Erase the key to the map. It is called by the AlterationNotifier.

Definition at line 93 of file map_utils.h.

virtual void clear  )  [inline, virtual]
 

Clear the keys from the map and inverse map. It is called by the AlterationNotifier.

Definition at line 106 of file map_utils.h.

const InverseMap& inverse  )  const [inline]
 

It gives back the just readeable inverse map.

Definition at line 114 of file map_utils.h.


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