ArrayMap Class Template Reference
[Graphmaps]

#include <array_map.h>

Inheritance diagram for ArrayMap:

Inheritance graph
[legend]
Collaboration diagram for ArrayMap:

Collaboration graph
[legend]
List of all members.

Detailed Description

template<typename MapRegistry, typename Value>
class lemon::ArrayMap< MapRegistry, Value >

The ArrayMap 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.

The template parameter is the MapRegistry that the maps will belong to and the ValueType.

Definition at line 46 of file array_map.h.

Public Types

typedef MapRegistry::Graph Graph
 The graph type of the maps.
typedef MapRegistry::KeyType KeyType
 The key type of the maps.
typedef MapRegistry::KeyIt KeyIt
 The iterator to iterate on the keys.
typedef MapRegistry::MapBase MapBase
 The MapBase of the Map which imlements the core regisitry function.
typedef Value ValueType
 The value type of the map.
typedef Value & ReferenceType
 The reference type of the map;.
typedef Value * PointerType
 The pointer type of the map;.
typedef const Value ConstValueType
 The const value type of the map.
typedef const Value & ConstReferenceType
 The const reference type of the map;.
typedef const Value * ConstPointerType
 The pointer type of the map;.
typedef MapIterator< ArrayMapIterator
 The stl compatible pair iterator of the map.
typedef MapConstIterator<
ArrayMap
ConstIterator
 The stl compatible const pair iterator of the map.
typedef MapConstKeySet< ArrayMapConstKeySet
 The KeySet of the Map.
typedef MapConstValueSet<
ArrayMap
ConstValueSet
 The ConstValueSet of the Map.
typedef MapValueSet< ArrayMapValueSet
 The ValueSet of the Map.

Public Member Functions

 ArrayMap (const Graph &g, MapRegistry &r)
 ArrayMap (const Graph &g, MapRegistry &r, const Value &v)
 ArrayMap (const ArrayMap &copy)
template<typename TT>  ArrayMap (const ArrayMap< MapRegistry, TT > &copy)
ArrayMapoperator= (const ArrayMap &copy)
template<typename TT> ArrayMapoperator= (const ArrayMap< MapRegistry, TT > &copy)
virtual ~ArrayMap ()
ReferenceType operator[] (const KeyType &key)
ConstReferenceType operator[] (const KeyType &key) const
void set (const KeyType &key, const ValueType &val)
void add (const KeyType &key)
void erase (const KeyType &key)
void clear ()
Iterator begin ()
Iterator end ()
ConstIterator begin () const
ConstIterator end () const
ConstKeySet keySet () const
 KeySet getter function.
ConstValueSet valueSet () const
 ConstValueSet getter function.
ValueSet valueSet ()
 ValueSet getter function.


Constructor & Destructor Documentation

ArrayMap const Graph g,
MapRegistry r
[inline]
 

Graph and Registry initialized map constructor. Definition at line 85 of file array_map.h.

References ArrayMap::Graph, lemon::INVALID, ArrayMap::KeyIt, and ArrayMap::MapBase.

ArrayMap const Graph g,
MapRegistry r,
const Value &  v
[inline]
 

Constructor to use default value to initialize the map. Definition at line 95 of file array_map.h.

References ArrayMap::Graph, lemon::INVALID, ArrayMap::KeyIt, and ArrayMap::MapBase.

ArrayMap const ArrayMap< MapRegistry, Value > &  copy  )  [inline]
 

Constructor to copy a map of the same map type. Definition at line 106 of file array_map.h.

References ArrayMap::capacity, lemon::INVALID, ArrayMap::KeyIt, ArrayMap::MapBase, and ArrayMap::values.

ArrayMap const ArrayMap< MapRegistry, TT > &  copy  )  [inline]
 

Constructor to copy a map of an other map type. Definition at line 119 of file array_map.h.

References ArrayMap::capacity, lemon::INVALID, ArrayMap::KeyIt, ArrayMap::MapBase, and ArrayMap::values.

virtual ~ArrayMap  )  [inline, virtual]
 

The destructor of the map. Definition at line 183 of file array_map.h.


Member Function Documentation

ArrayMap& operator= const ArrayMap< MapRegistry, Value > &  copy  )  [inline]
 

Assign operator to copy a map of the same map type. Definition at line 132 of file array_map.h.

References ArrayMap::capacity, MapRegistry::MapBase::getGraph(), lemon::INVALID, ArrayMap::KeyIt, and ArrayMap::values.

Here is the call graph for this function:

ArrayMap& operator= const ArrayMap< MapRegistry, TT > &  copy  )  [inline]
 

Assign operator to copy a map of an other map type. Definition at line 158 of file array_map.h.

References ArrayMap::capacity, MapRegistry::MapBase::getGraph(), lemon::INVALID, ArrayMap::KeyIt, and ArrayMap::values.

Here is the call graph for this function:

ReferenceType operator[] const KeyType key  )  [inline]
 

The subscript operator. The map can be subscripted by the actual keys of the graph. Definition at line 195 of file array_map.h.

References ArrayMap::KeyType, and ArrayMap::ReferenceType.

ConstReferenceType operator[] const KeyType key  )  const [inline]
 

The const subscript operator. The map can be subscripted by the actual keys of the graph. Definition at line 204 of file array_map.h.

References ArrayMap::ConstReferenceType, and ArrayMap::KeyType.

void set const KeyType key,
const ValueType val
[inline]
 

Setter function of the map. Equivalent with map[key] = val. This is a compatibility feature with the not dereferable maps. Definition at line 212 of file array_map.h.

References ArrayMap::KeyType, and ArrayMap::ValueType.

void add const KeyType key  )  [inline, virtual]
 

Add a new key to the map. It called by the map registry.

Implements MapRegistry::MapBase.

Definition at line 219 of file array_map.h.

References lemon::INVALID, ArrayMap::KeyIt, and ArrayMap::KeyType.

void erase const KeyType key  )  [inline, virtual]
 

Erase a key from the map. It called by the map registry.

Implements MapRegistry::MapBase.

Definition at line 243 of file array_map.h.

References ArrayMap::KeyType.

void clear  )  [inline, virtual]
 

Clear the data structure.

Implements MapRegistry::MapBase.

Definition at line 250 of file array_map.h.

Iterator begin  )  [inline]
 

Returns the begin iterator of the map. Definition at line 265 of file array_map.h.

References ArrayMap::Iterator, and ArrayMap::KeyIt.

Iterator end  )  [inline]
 

Returns the end iterator of the map. Definition at line 271 of file array_map.h.

References lemon::INVALID, and ArrayMap::Iterator.

ConstIterator begin  )  const [inline]
 

Returns the begin ConstIterator of the map. Definition at line 277 of file array_map.h.

References ArrayMap::ConstIterator, and ArrayMap::KeyIt.

ConstIterator end  )  const [inline]
 

Returns the end const_iterator of the map. Definition at line 283 of file array_map.h.

References ArrayMap::ConstIterator, and lemon::INVALID.


The documentation for this class was generated from the following file:
Generated on Thu Sep 30 12:18:36 2004 for LEMON by doxygen 1.3.8