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

InvertableMap Class Template Reference
[Graph Maps]

#include <lemon/graph_utils.h>

List of all members.


Detailed Description

template<typename _Graph, typename _Item, typename _Value, typename _Map = typename ItemSetTraits<_Graph, _Item>::template Map<_Value>::Parent>
class lemon::InvertableMap< _Graph, _Item, _Value, _Map >

This type provides simple invertable graph-maps. The InvertableMap wraps an arbitrary ReadWriteMap and if a key is set to a new value then store it in the inverse map.
Parameters:
_Graph The graph type.
_Map The map to extend with invertable functionality.


Public Types

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

Public Member Functions

 InvertableMap (const Graph &graph)
 Constructor.
void set (const Key &key, const Value &val)
 The setter function of the map.
const Value operator[] (const Key &key) const
 The getter function of the map.
InverseMap inverse () const
 It gives back the just readeable inverse map.

Protected Member Functions

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.

Classes

class  InverseMap
 The inverse map type. More...


Constructor & Destructor Documentation

InvertableMap const Graph &  graph  )  [inline]
 

Construct a new InvertableMap for the graph.


Member Function Documentation

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

Sets the mapped value.

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

It gives back the value associated with the key.

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

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

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

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

virtual void clear  )  [inline, protected, virtual]
 

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

InverseMap inverse  )  const [inline]
 

It gives back the just readeable inverse map.


The documentation for this class was generated from the following file:
Generated on Sat Aug 27 14:15:36 2005 for LEMON by  doxygen 1.4.4