Index: src/hugo/array_map.h
===================================================================
--- src/hugo/array_map.h	(revision 822)
+++ src/hugo/array_map.h	(revision 822)
@@ -0,0 +1,285 @@
+// -*- c++ -*-
+#ifndef ARRAY_MAP_H
+#define ARRAY_MAP_H
+
+#include <memory>
+
+#include <hugo/map_iterator.h>
+
+///\ingroup graphmaps
+///\file
+///\brief Graph maps that construates and destruates
+///their elements dynamically.
+
+namespace hugo {
+
+
+  /// \addtogroup graphmaps
+  /// @{
+	
+  /** 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.
+   */
+
+  template <typename MapRegistry, typename Value> 
+  class ArrayMap : public MapRegistry::MapBase {
+		
+  public:
+		
+    /// The graph type of the maps. 
+    typedef typename MapRegistry::Graph Graph;
+    /// The key type of the maps.
+    typedef typename MapRegistry::KeyType KeyType;
+    /// The iterator to iterate on the keys.
+    typedef typename MapRegistry::KeyIt KeyIt;
+
+    /// The MapBase of the Map which imlements the core regisitry function.
+    typedef typename MapRegistry::MapBase MapBase;
+		
+    
+  public:
+
+    /// The value type of the map.
+    typedef Value ValueType;
+    /// The reference type of the map;
+    typedef Value& ReferenceType;
+    /// The pointer type of the map;
+    typedef Value* PointerType;
+
+    /// The const value type of the map.
+    typedef const Value ConstValueType;
+    /// The const reference type of the map;
+    typedef const Value& ConstReferenceType;
+    /// The pointer type of the map;
+    typedef const Value* ConstPointerType;
+
+
+    typedef std::allocator<Value> Allocator;
+
+	
+    /** Default constructor for the map.
+     */
+    ArrayMap() : values(0), capacity(0) {}
+			
+    /** Graph and Registry initialized map constructor.
+     */
+    ArrayMap(const Graph& g, MapRegistry& r) : MapBase(g, r) {
+      allocate_memory();
+      for (KeyIt it(*MapBase::getGraph()); it != INVALID; ++it) {
+	int id = MapBase::getGraph()->id(it);
+	allocator.construct(&(values[id]), Value());
+      }								
+    }
+
+    /** Constructor to use default value to initialize the map. 
+     */
+    ArrayMap(const Graph& g, MapRegistry& r, const Value& v) 
+      : MapBase(g, r) {
+      allocate_memory();
+      for (KeyIt it(*MapBase::getGraph()); it != INVALID; ++it) {
+	int id = MapBase::getGraph()->id(it);
+	allocator.construct(&(values[id]), v);
+      }								
+    }
+
+    /** Constructor to copy a map of the same map type.
+     */
+    ArrayMap(const ArrayMap& copy) : MapBase(*copy.graph, *copy.registry) {
+      capacity = copy.capacity;
+      if (capacity == 0) return;
+      values = allocator.allocate(capacity);
+      for (KeyIt it(*MapBase::getGraph()); it != INVALID; ++it) {
+	int id = MapBase::getGraph()->id(it);
+	allocator.construct(&(values[id]), copy.values[id]);
+      }
+    }
+
+    /** Constructor to copy a map of an other map type.
+     */
+    template <typename CMap> ArrayMap(const CMap& copy) 
+      : MapBase(copy), capacity(0), values(0) {
+      if (MapBase::getGraph()) {
+	allocate_memory();
+	for (KeyIt it(*MapBase::getGraph()); it != INVALID; ++it) {
+	  set(it, copy[it]);
+	}
+      }
+    }
+
+    /** Assign operator to copy a map of the same map type.
+     */
+    ArrayMap& operator=(const ArrayMap& copy) {
+      if (&copy == this) return *this;
+      if (capacity != 0) {
+	MapBase::destroy();
+	allocator.deallocate(values, capacity);
+      }
+      capacity = copy.capacity;
+      if (capacity == 0) return *this;
+      values = allocator.allocate(capacity);
+      for (KeyIt it(*MapBase::getGraph()); it != INVALID; ++it) {
+	int id = MapBase::getGraph()->id(it);
+	allocator.construct(&(values[id]), copy.values[id]);
+      }
+      return *this;
+    }
+
+    /** Assign operator to copy a map an other map type.
+     */
+    template <typename CMap> ArrayMap& operator=(const CMap& copy) {
+      if (MapBase::getGraph()) {
+	MapBase::destroy();
+      } 
+      MapBase::operator=(copy);
+      if (MapBase::getGraph()) {
+	allocate_memory();
+	for (KeyIt it(*MapBase::getGraph()); it != INVALID; ++it) {
+	  set(it, copy[it]);
+	}
+      }
+      return *this;
+    }
+				
+    /** The destructor of the map.
+     */
+    virtual ~ArrayMap() {
+      if (capacity != 0) {
+	MapBase::destroy();
+	allocator.deallocate(values, capacity);
+      }
+    }
+	
+	
+    /**
+     * The subscript operator. The map can be subscripted by the
+     * actual keys of the graph. 
+     */
+    ReferenceType operator[](const KeyType& key) {
+      int id = MapBase::getGraph()->id(key);
+      return values[id];
+    } 
+		
+    /**
+     * The const subscript operator. The map can be subscripted by the
+     * actual keys of the graph. 
+     */
+    ConstReferenceType operator[](const KeyType& key) const {
+      int id = MapBase::getGraph()->id(key);
+      return values[id];
+    }
+	
+    /** Setter function of the map. Equivalent with map[key] = val.
+     *  This is a compatibility feature with the not dereferable maps.
+     */
+    void set(const KeyType& key, const ValueType& val) {
+      int id = MapBase::getGraph()->id(key);
+      values[id] = val;
+    }
+		
+    /** Add a new key to the map. It called by the map registry.
+     */
+    void add(const KeyType& key) {
+      int id = MapBase::getGraph()->id(key);
+      if (id >= capacity) {
+	int new_capacity = (capacity == 0 ? 1 : capacity);
+	while (new_capacity <= id) {
+	  new_capacity <<= 1;
+	}
+	Value* new_values = allocator.allocate(new_capacity);;
+	for (KeyIt it(*MapBase::getGraph()); it != INVALID; ++it) {
+	  int jd = MapBase::getGraph()->id(it);
+	  if (id != jd) {
+	    allocator.construct(&(new_values[jd]), values[jd]);
+	    allocator.destroy(&(values[jd]));
+	  }
+	}
+	if (capacity != 0) allocator.deallocate(values, capacity);
+	values = new_values;
+	capacity = new_capacity;
+      }
+      allocator.construct(&(values[id]), Value());
+    }
+		
+    /** Erase a key from the map. It called by the map registry.
+     */
+    void erase(const KeyType& key) {
+      int id = MapBase::getGraph()->id(key);
+      allocator.destroy(&(values[id]));
+    }
+
+    /** Clear the data structure.
+     */
+    void clear() {	
+      if (capacity != 0) {
+	MapBase::destroy();
+	allocator.deallocate(values, capacity);
+	capacity = 0;
+      }
+    }
+
+    /// The stl compatible pair iterator of the map.
+    typedef MapIterator<ArrayMap> Iterator;
+    /// The stl compatible const pair iterator of the map.
+    typedef MapConstIterator<ArrayMap> ConstIterator;
+
+    /** Returns the begin iterator of the map.
+     */
+    Iterator begin() {
+      return Iterator(*this, KeyIt(*MapBase::getGraph()));
+    }
+
+    /** Returns the end iterator of the map.
+     */
+    Iterator end() {
+      return Iterator(*this, INVALID);
+    }
+
+    /** Returns the begin ConstIterator of the map.
+     */
+    ConstIterator begin() const {
+      return ConstIterator(*this, KeyIt(*MapBase::getGraph()));
+    }
+
+    /** Returns the end const_iterator of the map.
+     */
+    ConstIterator end() const {
+      return ConstIterator(*this, INVALID);
+    }
+
+  private:
+      
+    void allocate_memory() {
+      int max_id = -1;
+      for (KeyIt it(*MapBase::getGraph()); it != INVALID; ++it) {
+	int id = MapBase::getGraph()->id(it);
+	if (id > max_id) {
+	  max_id = id;
+	}			
+      }
+      if (max_id == -1) {
+	capacity = 0;
+	values = 0;
+	return;
+      }
+      capacity = 1;
+      while (capacity <= max_id) {
+	capacity <<= 1;
+      }
+      values = allocator.allocate(capacity);	
+    }      
+
+    int capacity;
+    Value* values;
+    Allocator allocator;
+  };		
+
+/// @}
+
+}
+
+#endif
Index: c/hugo/array_map_factory.h
===================================================================
--- src/hugo/array_map_factory.h	(revision 817)
+++ 	(revision )
@@ -1,444 +1,0 @@
-// -*- c++ -*-
-#ifndef ARRAY_MAP_FACTORY_H
-#define ARRAY_MAP_FACTORY_H
-
-#include <memory>
-
-#include <hugo/extended_pair.h>
-
-///\ingroup graphmapfactory
-///\file
-///\brief Graph maps that construates and destruates
-///their elements dynamically.
-
-namespace hugo {
-
-
-/// \addtogroup graphmapfactory
-/// @{
-	
-  /** The ArrayMapFactory template class is a factory class
-   *  to create maps for the edge and nodes. This map factory
-   *  uses the allocators to implement the container function.
-   *
-   *  The template parameter is the MapRegistry that the maps
-   *  will belong to.
-   */
-
-  template <typename MapRegistry> 
-  class ArrayMapFactory {
-		
-  public:
-		
-    /// The graph type of the maps. 
-    typedef typename MapRegistry::Graph Graph;
-    /// The key type of the maps.
-    typedef typename MapRegistry::KeyType KeyType;
-    /// The iterator to iterate on the keys.
-    typedef typename MapRegistry::KeyIt KeyIt;
-
-    /// The MapBase of the Map which imlements the core regisitry function.
-    typedef typename MapRegistry::MapBase MapBase;
-		
-    /** The template Map type.
-     */
-    template <typename V, typename A = std::allocator<V> > 
-    class Map : public MapBase {
-    
-      public:
-
-      /// The value type of the map.
-      typedef V ValueType;
-
-      /// The value type of the map.
-      typedef V Value;
-      /// The reference type of the map;
-      typedef Value& Reference;
-      /// The pointer type of the map;
-      typedef Value* Pointer;
-
-      /// The const value type of the map.
-      typedef const Value ConstValue;
-      /// The const reference type of the map;
-      typedef const Value& ConstReference;
-      /// The pointer type of the map;
-      typedef const Value* ConstPointer;
-
-
-      typedef A Allocator;
-
-	
-      /** Default constructor for the map.
-       */
-      Map() : values(0), capacity(0) {}
-			
-      /** Graph and Registry initialized map constructor.
-       */
-      Map(const Graph& g, MapRegistry& r) : MapBase(g, r) {
-	allocate_memory();
-	for (KeyIt it(*MapBase::getGraph()); it != INVALID; ++it) {
-	  int id = MapBase::getGraph()->id(it);
-	  allocator.construct(&(values[id]), Value());
-	}								
-      }
-
-      /** Constructor to use default value to initialize the map. 
-       */
-      Map(const Graph& g, MapRegistry& r, const Value& v) : MapBase(g, r) {
-	allocate_memory();
-	for (KeyIt it(*MapBase::getGraph()); it != INVALID; ++it) {
-	  int id = MapBase::getGraph()->id(it);
-	  allocator.construct(&(values[id]), v);
-	}								
-      }
-
-      /** Constructor to copy a map of the same map type.
-       */
-      Map(const Map& copy) : MapBase(*copy.graph, *copy.registry) {
-	capacity = copy.capacity;
-	if (capacity == 0) return;
-	values = allocator.allocate(capacity);
-	for (KeyIt it(*MapBase::getGraph()); it != INVALID; ++it) {
-	  int id = MapBase::getGraph()->id(it);
-	  allocator.construct(&(values[id]), copy.values[id]);
-	}
-      }
-
-      /** Constructor to copy a map of an other map type.
-       */
-      template <typename CMap> Map(const CMap& copy) 
-	: MapBase(copy), capacity(0), values(0) {
-	if (MapBase::getGraph()) {
-	  allocate_memory();
-	  for (KeyIt it(*MapBase::getGraph()); it != INVALID; ++it) {
-	    set(it, copy[it]);
-	  }
-	}
-      }
-
-      /** Assign operator to copy a map of the same map type.
-       */
-      Map& operator=(const Map& copy) {
-	if (&copy == this) return *this;
-	if (capacity != 0) {
-	  MapBase::destroy();
-	  allocator.deallocate(values, capacity);
-	}
-	capacity = copy.capacity;
-	if (capacity == 0) return *this;
-	values = allocator.allocate(capacity);
-	for (KeyIt it(*MapBase::getGraph()); it != INVALID; ++it) {
-	  int id = MapBase::getGraph()->id(it);
-	  allocator.construct(&(values[id]), copy.values[id]);
-	}
-	return *this;
-      }
-
-      /** Assign operator to copy a map an other map type.
-       */
-      template <typename CMap> Map& operator=(const CMap& copy) {
-	if (MapBase::getGraph()) {
-	  MapBase::destroy();
-	} 
-	MapBase::operator=(copy);
-	if (MapBase::getGraph()) {
-	  allocate_memory();
-	  for (KeyIt it(*MapBase::getGraph()); it != INVALID; ++it) {
-	    set(it, copy[it]);
-	  }
-	}
-	return *this;
-      }
-				
-      /** The destructor of the map.
-       */
-      virtual ~Map() {
-	if (capacity != 0) {
-	  MapBase::destroy();
-	  allocator.deallocate(values, capacity);
-	}
-      }
-	
-	
-      /**
-       * The subscript operator. The map can be subscripted by the
-       * actual keys of the graph. 
-       */
-      Value& operator[](const KeyType& key) {
-	int id = MapBase::getGraph()->id(key);
-	return values[id];
-      } 
-		
-      /**
-       * The const subscript operator. The map can be subscripted by the
-       * actual keys of the graph. 
-       */
-      const Value& operator[](const KeyType& key) const {
-	int id = MapBase::getGraph()->id(key);
-	return values[id];
-      }
-	
-      /** Setter function of the map. Equivalent with map[key] = val.
-       *  This is a compatibility feature with the not dereferable maps.
-       */
-      void set(const KeyType& key, const Value& val) {
-	int id = MapBase::getGraph()->id(key);
-	values[id] = val;
-      }
-		
-      /** Add a new key to the map. It called by the map registry.
-       */
-      void add(const KeyType& key) {
-	int id = MapBase::getGraph()->id(key);
-	if (id >= capacity) {
-	  int new_capacity = (capacity == 0 ? 1 : capacity);
-	  while (new_capacity <= id) {
-	    new_capacity <<= 1;
-	  }
-	  Value* new_values = allocator.allocate(new_capacity);;
-	  for (KeyIt it(*MapBase::getGraph()); it != INVALID; ++it) {
-	    int jd = MapBase::getGraph()->id(it);
-	    if (id != jd) {
-	      allocator.construct(&(new_values[jd]), values[jd]);
-	      allocator.destroy(&(values[jd]));
-	    }
-	  }
-	  if (capacity != 0) allocator.deallocate(values, capacity);
-	  values = new_values;
-	  capacity = new_capacity;
-	}
-	allocator.construct(&(values[id]), Value());
-      }
-		
-      /** Erase a key from the map. It called by the map registry.
-       */
-      void erase(const KeyType& key) {
-	int id = MapBase::getGraph()->id(key);
-	allocator.destroy(&(values[id]));
-      }
-
-      /** Clear the data structure.
-       */
-      void clear() {	
-	if (capacity != 0) {
-	  MapBase::destroy();
-	  allocator.deallocate(values, capacity);
-	  capacity = 0;
-	}
-      }
-
-      class iterator;
-      class const_iterator;
-	
-      /** Compatible iterator with the stl maps' iterators.
-       *  It iterates on pairs of a key and a value.
-       */
-      class iterator {
-	friend class Map;
-	friend class const_iterator;
-      private:
-
-	/** Private constructor to initalize the the iterators returned
-	 *  by the begin() and end().
-	 */
-	iterator (Map& pmap, const KeyIt& pit) : map(&pmap), it(pit) {}
-
-      public:
-
-	/** Default constructor. 
-	 */
-	iterator() {}
-
-	typedef extended_pair<const KeyType&, const KeyType&, 
-			      Value&, Value&> Reference;
-
-	/** Dereference operator for map.
-	 */	 
-	Reference operator*() {
-	  return Reference(it, (*map)[it]);
-	}
-
-	class Pointer {
-	  friend class iterator;
-	private:
-	  Reference data;
-	  Pointer(const KeyType& key, Value& val) : data(key, val) {}
-	public:
-	  Reference* operator->() {return &data;}
-	};
-
-	/** Arrow operator for map.
-	 */	 
-	Pointer operator->() {
-	  return Pointer(it, ((*map)[it])); 
-	}
-
-	/** The pre increment operator of the map.
-	 */
-	iterator& operator++() { 
-	  ++it; 
-	  return *this; 
-	}
-
-	/** The post increment operator of the map.
-	 */
-	iterator operator++(int) { 
-	  iterator tmp(it); 
-	  ++it; 
-	  return tmp; 
-	}
-
-	/** The equality operator of the map.
-	 */
-	bool operator==(const_iterator p_it) {
-	  return p_it.it == it;
-	}
-	
-	/** The not-equality operator of the map.
-	 */
-	bool operator!=(const_iterator p_it) {
-	  return !(*this == p_it);
-	}
-
-	
-      private:
-	Map* map;
-	KeyIt it;
-      };
-
-      /** Returns the begin iterator of the map.
-       */
-      iterator begin() {
-	return iterator(*this, KeyIt(*MapBase::getGraph()));
-      }
-
-      /** Returns the end iterator of the map.
-       */
-      iterator end() {
-	return iterator(*this, INVALID);
-      }
-
-      class const_iterator {
-	friend class Map;
-	friend class iterator;
-      private:
-
-	/** Private constructor to initalize the the iterators returned
-	 *  by the begin() and end().
-	 */
-	const_iterator (const Map& pmap, const KeyIt& pit) 
-	  : map(&pmap), it(pit) {}
-
-      public:
-
-	/** Default constructor. 
-	 */
-	const_iterator() {}
-
-	/** Constructor to convert iterator to const_iterator.
-	 */
-	const_iterator(iterator p_it) : map(p_it.map), it(p_it.it) {}
-      
-	typedef extended_pair<const KeyType&, const KeyType&, 
-	  const Value&, const Value&> Reference;
-
-	/** Dereference operator for map.
-	 */	 
-	Reference operator*() {
-	  return Reference(it, (*map)[it]);
-	}
-
-
-	class Pointer {
-	  friend class const_iterator;
-	private:
-	  Reference data;
-	  Pointer(const KeyType& key, const Value& val) : data(key, val) {}
-	public:
-	  Reference* operator->() {return &data;}
-	};
-
-	/** Arrow operator for map.
-	 */	 
-	Pointer operator->() {
-	  return Pointer(it, ((*map)[it])); 
-	}
-
-	/** The pre increment operator of the map.
-	 */
-	const_iterator& operator++() { 
-	  ++it; 
-	  return *this; 
-	}
-
-	/** The post increment operator of the map.
-	 */
-	const_iterator operator++(int) { 
-	  const_iterator tmp(it); 
-	  ++it; 
-	  return tmp; 
-	}
-
-	/** The equality operator of the map.
-	 */
-	bool operator==(const_iterator p_it) {
-	  return p_it.it == it;
-	}
-	
-	/** The not-equality operator of the map.
-	 */
-	bool operator!=(const_iterator p_it) {
-	  return !(*this == p_it);
-	}
-	
-
-      private:
-	const Map* map;
-	KeyIt it;
-      };
-
-      /** Returns the begin const_iterator of the map.
-       */
-      const_iterator begin() const {
-	return const_iterator(*this, KeyIt(*MapBase::getGraph()));
-      }
-
-      /** Returns the end const_iterator of the map.
-       */
-      const_iterator end() const {
-	return const_iterator(*this, INVALID);
-      }
-
-    private:
-      
-      void allocate_memory() {
-	int max_id = -1;
-	for (KeyIt it(*MapBase::getGraph()); it != INVALID; ++it) {
-	  int id = MapBase::getGraph()->id(it);
-	  if (id > max_id) {
-	    max_id = id;
-	  }			
-	}
-	if (max_id == -1) {
-	  capacity = 0;
-	  values = 0;
-	  return;
-	}
-	capacity = 1;
-	while (capacity <= max_id) {
-	  capacity <<= 1;
-	}
-	values = allocator.allocate(capacity);	
-      }      
-
-      int capacity;
-      Value* values;
-      Allocator allocator;
-    };		
-  };
-
-/// @}
-
-}
-
-#endif
Index: src/hugo/default_map.h
===================================================================
--- src/hugo/default_map.h	(revision 822)
+++ src/hugo/default_map.h	(revision 822)
@@ -0,0 +1,115 @@
+// -*- c++ -*-
+#ifndef DEFAULT_MAP_H
+#define DEFAULT_MAP_H
+
+
+#include <hugo/array_map.h>
+#include <hugo/vector_map.h>
+
+///\ingroup graphmaps
+///\file
+///\brief Graph maps that construates and destruates
+///their elements dynamically.
+
+namespace hugo {
+
+/// \addtogroup graphmaps
+/// @{
+
+  /** 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 uses the VectorMap if the ValueType is a primitive
+   *  type and the ArrayMap for the other cases.
+   *
+   *  The template parameter is the MapRegistry that the maps
+   *  will belong to and the ValueType.
+   */
+
+
+  /** Macro to implement the DefaultMap.
+   */
+#define DEFAULT_MAP_BODY(DynMap, Value) \
+  { \
+    typedef DynMap<MapRegistry, Value> MapImpl; \
+  \
+  public: \
+  \
+    typedef typename MapRegistry::Graph Graph; \
+  \
+    DefaultMap() : MapImpl() {} \
+  \
+    DefaultMap(const Graph& g, MapRegistry& r) : MapImpl(g, r) {} \
+  \
+    DefaultMap(const Graph& g, MapRegistry& r, const Value& v) \
+      : MapImpl(g, r, v) {} \
+  \
+    DefaultMap(const DefaultMap& copy) \
+      : MapImpl(static_cast<const MapImpl&>(copy)) {} \
+  \
+    template <typename CMap> DefaultMap(const CMap& copy) : MapImpl(copy) {} \
+  \
+    DefaultMap& operator=(const DefaultMap& copy) { \
+      MapImpl::operator=(static_cast<const MapImpl&>(copy)); \
+      return *this; \
+    } \
+  \
+    template <typename CMap> DefaultMap& operator=(const CMap& copy) { \
+      MapImpl::operator=(copy); \
+      return *this; \
+    } \
+  \
+  };
+
+
+  template <typename MapRegistry, typename Type>
+  class DefaultMap : public ArrayMap<MapRegistry, Type> 
+  DEFAULT_MAP_BODY(ArrayMap, Type);
+
+  template <typename MapRegistry>
+  class DefaultMap<MapRegistry, bool> 
+    : public VectorMap<MapRegistry, bool> 
+  DEFAULT_MAP_BODY(VectorMap, bool);
+
+  template <typename MapRegistry>
+  class DefaultMap<MapRegistry, char> 
+    : public VectorMap<MapRegistry, char> 
+  DEFAULT_MAP_BODY(VectorMap, char);
+
+  template <typename MapRegistry>
+  class DefaultMap<MapRegistry, int> 
+    : public VectorMap<MapRegistry, int> 
+  DEFAULT_MAP_BODY(VectorMap, int);
+
+  template <typename MapRegistry>
+  class DefaultMap<MapRegistry, short> 
+    : public VectorMap<MapRegistry, short> 
+  DEFAULT_MAP_BODY(VectorMap, short);
+
+  template <typename MapRegistry>
+  class DefaultMap<MapRegistry, long> 
+    : public VectorMap<MapRegistry, long> 
+  DEFAULT_MAP_BODY(VectorMap, long);
+
+  template <typename MapRegistry>
+  class DefaultMap<MapRegistry, float> 
+    : public VectorMap<MapRegistry, float> 
+  DEFAULT_MAP_BODY(VectorMap, float);
+
+  template <typename MapRegistry>
+  class DefaultMap<MapRegistry, double> 
+    : public VectorMap<MapRegistry, double> 
+  DEFAULT_MAP_BODY(VectorMap, double);
+
+  template <typename MapRegistry>
+  class DefaultMap<MapRegistry, long double> 
+    : public VectorMap<MapRegistry, long double> 
+  DEFAULT_MAP_BODY(VectorMap, long double);
+
+  template <typename MapRegistry, typename Type>
+  class DefaultMap<MapRegistry, Type*>
+    : public VectorMap<MapRegistry, Type*> 
+  DEFAULT_MAP_BODY(VectorMap, Type*);
+
+}
+
+#endif
Index: c/hugo/default_map_factory.h
===================================================================
--- src/hugo/default_map_factory.h	(revision 799)
+++ 	(revision )
@@ -1,181 +1,0 @@
-// -*- c++ -*-
-#ifndef DEFAULT_MAP_FACTORY_H
-#define DEFAULT_MAP_FACTORY_H
-
-
-#include <hugo/array_map_factory.h>
-#include <hugo/vector_map_factory.h>
-
-///\ingroup graphmapfactory
-///\file
-///\brief Graph maps that construates and destruates
-///their elements dynamically.
-
-namespace hugo {
-
-/// \addtogroup graphmapfactory
-/// @{
-
-#define DEFAULT_MAP_BODY(Factory, Val) \
-  { \
-    typedef typename Factory<MapRegistry>::template Map<Val> MapImpl; \
-  \
-  public: \
-  \
-    typedef typename MapRegistry::Graph Graph; \
-    typedef typename MapRegistry::KeyType KeyType; \
-    typedef typename MapRegistry::KeyIt KeyIt; \
-    typedef Val Value; \
-  \
-    typedef typename MapRegistry::MapBase MapBase; \
-  \
-    DefaultMap() : MapImpl() {} \
-  \
-    DefaultMap(const Graph& g, MapRegistry& r) : MapImpl(g, r) {} \
-  \
-    DefaultMap(const Graph& g, MapRegistry& r, const Value& v) \
-      : MapImpl(g, r, v) {} \
-  \
-    DefaultMap(const DefaultMap& copy) \
-      : MapImpl(static_cast<const MapImpl&>(copy)) {} \
-  \
-    template <typename CMap> DefaultMap(const CMap& copy) : MapImpl(copy) {} \
-  \
-    DefaultMap& operator=(const DefaultMap& copy) { \
-      MapImpl::operator=(static_cast<const MapImpl&>(copy)); \
-      return *this; \
-    } \
-  \
-    template <typename CMap> DefaultMap& operator=(const CMap& copy) { \
-      MapImpl::operator=(copy); \
-      return *this; \
-    } \
-  \
-  };
-
-
-  template <typename MapRegistry, typename Type>
-  class DefaultMap : public ArrayMapFactory<MapRegistry>::template Map<Type> 
-  DEFAULT_MAP_BODY(ArrayMapFactory, Type);
-
-  template <typename MapRegistry>
-  class DefaultMap<MapRegistry, bool> 
-    : public VectorMapFactory<MapRegistry>::template Map<bool> 
-  DEFAULT_MAP_BODY(VectorMapFactory, bool);
-
-  template <typename MapRegistry>
-  class DefaultMap<MapRegistry, char> 
-    : public VectorMapFactory<MapRegistry>::template Map<char> 
-  DEFAULT_MAP_BODY(VectorMapFactory, char);
-
-  template <typename MapRegistry>
-  class DefaultMap<MapRegistry, int> 
-    : public VectorMapFactory<MapRegistry>::template Map<int> 
-  DEFAULT_MAP_BODY(VectorMapFactory, int);
-
-  template <typename MapRegistry>
-  class DefaultMap<MapRegistry, short> 
-    : public VectorMapFactory<MapRegistry>::template Map<short> 
-  DEFAULT_MAP_BODY(VectorMapFactory, short);
-
-  template <typename MapRegistry>
-  class DefaultMap<MapRegistry, long> 
-    : public VectorMapFactory<MapRegistry>::template Map<long> 
-  DEFAULT_MAP_BODY(VectorMapFactory, long);
-
-  template <typename MapRegistry>
-  class DefaultMap<MapRegistry, float> 
-    : public VectorMapFactory<MapRegistry>::template Map<float> 
-  DEFAULT_MAP_BODY(VectorMapFactory, float);
-
-  template <typename MapRegistry>
-  class DefaultMap<MapRegistry, double> 
-    : public VectorMapFactory<MapRegistry>::template Map<double> 
-  DEFAULT_MAP_BODY(VectorMapFactory, double);
-
-  template <typename MapRegistry>
-  class DefaultMap<MapRegistry, long double> 
-    : public VectorMapFactory<MapRegistry>::template Map<long double> 
-  DEFAULT_MAP_BODY(VectorMapFactory, long double);
-
-  template <typename MapRegistry, typename Type>
-  class DefaultMap<MapRegistry, Type*>
-    : public VectorMapFactory<MapRegistry>::template Map<Type*> 
-  DEFAULT_MAP_BODY(VectorMapFactory, Type*);
-
-
-  /** The DefaultMapFactory template class is a factory class
-   *  to create maps for the edge and nodes. This map factory
-   *  uses the VectorMapFactory if the ValueType is a primitive
-   *  type and the ArrayMapFactory for the other cases.
-   *
-   *  The template parameter is the MapRegistry that the maps
-   *  will belong to.
-   */
-
-  template <typename MapRegistry>
-  class DefaultMapFactory {
-		
-  public:
-    /// The graph type of the maps. 
-    typedef typename MapRegistry::Graph Graph;
-    /// The key type of the maps.
-    typedef typename MapRegistry::KeyType KeyType;
-    /// The iterator to iterate on the keys.
-    typedef typename MapRegistry::KeyIt KeyIt;
-
-    /// The MapBase of the Map which imlements the core regisitry function.
-    typedef typename MapRegistry::MapBase MapBase;
-		
-
-    /** The template Map type.
-     */
-    template <typename V> 
-    class Map : public DefaultMap<MapRegistry, V> {
-
-      typedef DefaultMap<MapRegistry, V> MapImpl;
-
-    public:
-      
-      typedef V Value;
-
-      /** Default constructor for the map.
-       */
-      Map() : MapImpl() {}
-
-      /** Graph and Registry initialized map constructor.
-       */
-      Map(const Graph& g, MapRegistry& r) : MapImpl(g, r) {}
-
-      /** Constructor to use default value to initialize the map. 
-       */
-      Map(const Graph& g, MapRegistry& r, const Value& v) : MapImpl(g, r, v) {}
-
-      /** Constructor to copy a map of the same map type.
-       */
-      Map(const Map& copy) : MapImpl(static_cast<const MapImpl&>(copy)) {}
-
-      /** Constructor to copy a map of an other map type.
-       */
-      template <typename CMap> Map(const CMap& copy) : MapImpl(copy) {}
-
-      /** Assign operator to copy a map of the same map type.
-       */
-      Map& operator=(const Map& copy) {
-	MapImpl::operator=(static_cast<const MapImpl&>(copy));
-	return *this;
-      }
-
-      /** Assign operator to copy a map an other map type.
-       */
-      template <typename CMap> Map& operator=(const CMap& copy) {
-	MapImpl::operator=(copy);
-	return *this;
-      }
-
-    };
-
-  };
-}
-
-#endif
Index: src/hugo/full_graph.h
===================================================================
--- src/hugo/full_graph.h	(revision 813)
+++ src/hugo/full_graph.h	(revision 822)
@@ -14,5 +14,7 @@
 
 #include <hugo/map_registry.h>
-#include <hugo/default_map_factory.h>
+#include <hugo/default_map.h>
+
+#include <hugo/map_defines.h>
 
 namespace hugo {
@@ -48,6 +50,9 @@
     class InEdgeIt;
     
+
+    /// Creating map registries.
     CREATE_MAP_REGISTRIES;
-    CREATE_MAPS(DefaultMapFactory);
+    /// Creating node and edge maps.
+    CREATE_MAPS(DefaultMap);
     
   public:
Index: src/hugo/list_graph.h
===================================================================
--- src/hugo/list_graph.h	(revision 813)
+++ src/hugo/list_graph.h	(revision 822)
@@ -14,7 +14,7 @@
 
 #include <hugo/map_registry.h>
-#include <hugo/default_map_factory.h>
-
-#include <hugo/sym_map_factory.h>
+#include <hugo/default_map.h>
+
+#include <hugo/sym_map.h>
 
 #include <hugo/map_defines.h>
@@ -80,6 +80,8 @@
     class InEdgeIt;
 
+    /// Creating map registries.
     CREATE_MAP_REGISTRIES;
-    CREATE_MAPS(DefaultMapFactory);
+    /// Creating node and edge maps.
+    CREATE_MAPS(DefaultMap);
 
   public:
@@ -444,10 +446,11 @@
     typedef SymListGraph Graph;
 
-    KEEP_NODE_MAP(ListGraph);
-    KEEP_EDGE_MAP(ListGraph);
-
+    /// Importing maps from the base class ListGraph.
+    KEEP_MAPS(ListGraph, SymListGraph);
+
+    /// Creating symmetric map registry.
     CREATE_SYM_EDGE_MAP_REGISTRY;
-    CREATE_SYM_EDGE_MAP_FACTORY(DefaultMapFactory);
-    IMPORT_SYM_EDGE_MAP(SymEdgeMapFactory);
+    /// Creating symmetric edge map.
+    CREATE_SYM_EDGE_MAP(DefaultMap);
 
     SymListGraph() : ListGraph() { }
@@ -530,6 +533,38 @@
     class InEdgeIt;
     
-    CREATE_MAP_REGISTRIES;
-    CREATE_MAPS(DefaultMapFactory);
+    /// Creating node map registry.
+    CREATE_NODE_MAP_REGISTRY;
+    /// Creating node maps.
+    CREATE_NODE_MAP(DefaultMap);
+
+    /// Creating empty map structure for edges.
+    template <typename Value>
+    class EdgeMap {
+    public:
+      EdgeMap() {}
+      EdgeMap(const Graph&) {}
+      EdgeMap(const Graph&, const Value&) {}
+
+      EdgeMap(const EdgeMap&) {}
+      template <typename CMap> EdgeMap(const CMap&) {}
+
+      EdgeMap& operator=(const EdgeMap&) {}
+      template <typename CMap> EdgeMap& operator=(const CMap&) {}
+      
+      class ConstIterator {
+      public:
+	bool operator==(const ConstIterator&) {return true;}
+	bool operator!=(const ConstIterator&) {return false;}
+      };
+
+      typedef ConstIterator Iterator;
+      
+      Iterator begin() { return Iterator();}
+      Iterator end() { return Iterator();}
+
+      ConstIterator begin() const { return ConstIterator();}
+      ConstIterator end() const { return ConstIterator();}
+
+    };
     
   public:
@@ -849,7 +884,11 @@
 
 
+    /// Creating edge map registry.
     CREATE_EDGE_MAP_REGISTRY;
-    CREATE_EDGE_MAP_FACTORY(DefaultMapFactory);
-    IMPORT_EDGE_MAP(EdgeMapFactory);
+    /// Creating edge maps.
+    CREATE_EDGE_MAP(DefaultMap);
+
+    /// Importing node maps from the NodeGraphType.
+    IMPORT_NODE_MAP(NodeGraphType, graph.G, EdgeSet, graph);
     
     
@@ -1091,40 +1130,5 @@
       InEdgeIt &operator++() { n=G->edges[n].next_in; return *this; }
     };
-
-    
-    template <typename V> class NodeMap 
-      : public NodeGraphType::template NodeMap<V>
-    {
-      //This is a must, the constructors need it.
-      typedef typename NodeGraphType::template NodeMap<V> MapImpl;
-      typedef V Value;
-    public:
-      NodeMap() : MapImpl() {}
-      
-      NodeMap(const EdgeSet& graph) 
-	: MapImpl(graph.G) { }
-
-      NodeMap(const EdgeSet& graph, const Value& value) 
-	: MapImpl(graph.G, value) { }
-
-      NodeMap(const NodeMap& copy) 
-	: MapImpl(static_cast<const MapImpl&>(copy)) {}
-
-      template<typename CMap>
-      NodeMap(const CMap& copy)
-	: MapImpl(copy) { }
-
-      NodeMap& operator=(const NodeMap& copy) {
-	MapImpl::operator=(static_cast<const MapImpl&>(copy));
-	return *this;
-      }
-
-      template <typename CMap>
-      NodeMap& operator=(const CMap& copy) {
-	MapImpl::operator=(copy);
-	return *this;
-      }
-
-    };
+    
   };
 
Index: src/hugo/map_defines.h
===================================================================
--- src/hugo/map_defines.h	(revision 785)
+++ src/hugo/map_defines.h	(revision 822)
@@ -3,5 +3,5 @@
 #define MAP_DEFINES_H
 
-///\ingroup graphmapfactory
+///\ingroup graphmaps
 ///\file
 ///\brief Defines to help creating graph maps.
@@ -30,23 +30,5 @@
 CREATE_EDGE_MAP_REGISTRY
 
-/** Creates a concrete factory type from a template map
- *  factory to use as node map factory.
- */
-#define CREATE_NODE_MAP_FACTORY(TemplateFactory) \
-typedef TemplateFactory<NodeMapRegistry> NodeMapFactory;
-
-/** Creates a concrete factory type from a template map
- *  factory to use as edge map factory.
- */
-#define CREATE_EDGE_MAP_FACTORY(TemplateFactory) \
-typedef TemplateFactory<EdgeMapRegistry> EdgeMapFactory;
-
-/** Creates both map factories.
- */
-#define CREATE_MAP_FACTORIES(TemplateFactory) \
-CREATE_NODE_MAP_FACTORY(TemplateFactory) \
-CREATE_EDGE_MAP_FACTORY(TemplateFactory) 
-
-/** Import a map from a concrete map factory. The import method is
+/** Creates a map from a template map. The import method is
  *  an overloading of the map type.
  *  The reason to use these macro is that the c++ does not support
@@ -54,12 +36,14 @@
  *  supports this feature it should be fixed.
  */
-#define IMPORT_NODE_MAP(Factory) \
-template <typename V> \
-class NodeMap : public Factory::template Map<V> { \
-typedef typename Factory::template Map<V> MapImpl; \
+#define CREATE_NODE_MAP(DynMap) \
+template <typename Value> \
+class NodeMap : public DynMap<NodeMapRegistry, Value> { \
+typedef DynMap<NodeMapRegistry, Value> MapImpl; \
 public: \
 NodeMap() {} \
-NodeMap(const Graph& g) : MapImpl(g, g.node_maps) {} \
-NodeMap(const Graph& g, const V& v) : MapImpl(g, g.node_maps, v) {} \
+NodeMap(const typename MapImpl::Graph& g) \
+  : MapImpl(g, g.node_maps) {} \
+NodeMap(const typename MapImpl::Graph& g, const Value& v) \
+  : MapImpl(g, g.node_maps, v) {} \
 NodeMap(const NodeMap& copy) : MapImpl(static_cast<const MapImpl&>(copy)) {} \
 template <typename CMap> NodeMap(const CMap& copy) : MapImpl(copy) {} \
@@ -74,5 +58,5 @@
 };
 
-/** Import a map from a concrete map factory. The import method is
+/** Creates a map from a template map. The import method is
  *  an overloading of the map type.
  *  The reason to use these macro is that the c++ does not support
@@ -80,12 +64,14 @@
  *  supports this feature it should be fixed.
  */
-#define IMPORT_EDGE_MAP(Factory) \
-template <typename V> \
-class EdgeMap : public Factory::template Map<V> { \
-typedef typename Factory::template Map<V> MapImpl; \
+#define CREATE_EDGE_MAP(DynMap) \
+template <typename Value> \
+class EdgeMap : public DynMap<EdgeMapRegistry, Value> { \
+typedef DynMap<EdgeMapRegistry, Value> MapImpl; \
 public: \
 EdgeMap() {} \
-EdgeMap(const Graph& g) : MapImpl(g, g.edge_maps) {} \
-EdgeMap(const Graph& g, const V& v) : MapImpl(g, g.edge_maps, v) {} \
+EdgeMap(const typename MapImpl::Graph& g) \
+  : MapImpl(g, g.edge_maps) {} \
+EdgeMap(const typename MapImpl::Graph& g, const Value& v) \
+  : MapImpl(g, g.edge_maps, v) {} \
 EdgeMap(const EdgeMap& copy) : MapImpl(static_cast<const MapImpl&>(copy)) {} \
 template <typename CMap> EdgeMap(const CMap& copy) : MapImpl(copy) {} \
@@ -100,10 +86,9 @@
 };
 
-/** This macro creates both map factories and imports both maps.
- */
-#define CREATE_MAPS(TemplateFactory) \
-CREATE_MAP_FACTORIES(TemplateFactory) \
-IMPORT_NODE_MAP(NodeMapFactory) \
-IMPORT_EDGE_MAP(EdgeMapFactory)
+/** This macro creates both maps.
+ */
+#define CREATE_MAPS(DynMap) \
+CREATE_NODE_MAP(DynMap) \
+CREATE_EDGE_MAP(DynMap)
 
 /** This macro creates MapRegistry for Symmetric Edge Maps.
@@ -114,12 +99,6 @@
 mutable EdgeMapRegistry sym_edge_maps;
 
-/** Creates a concrete factory type from a template map
- *  factory to use as edge map factory.
- */
-#define CREATE_SYM_EDGE_MAP_FACTORY(TemplateFactory) \
-typedef SymMapFactory<SymEdgeMapRegistry, TemplateFactory > \
-SymEdgeMapFactory;
-
-/** Import a map from a concrete map factory. The import method is
+
+/** Creates a map from a template map. The import method is
  *  an overloading of the map type.
  *  The reason to use these macro is that the c++ does not support
@@ -127,94 +106,110 @@
  *  supports this feature it should be fixed.
  */
-#define IMPORT_SYM_EDGE_MAP(Factory) \
-template <typename V> \
-class SymEdgeMap : public Factory::template Map<V> { \
-typedef typename Factory::template Map<V> MapImpl; \
-public: \
-SymEdgeMap() {} \
-SymEdgeMap(const Graph& g) : MapImpl(g, g.sym_edge_maps) {} \
-SymEdgeMap(const Graph& g, const V& v) : MapImpl(g, g.sym_edge_maps, v) {} \
-SymEdgeMap(const SymEdgeMap& copy) \
-  : MapImpl(static_cast<const MapImpl&>(copy)) {} \
-template <typename CMap> SymEdgeMap(const CMap& copy) : MapImpl(copy) {} \
-SymEdgeMap& operator=(const SymEdgeMap& copy) { \
-  MapImpl::operator=(static_cast<const MapImpl&>(copy));\
-  return *this; \
-} \
-template <typename CMap> SymEdgeMap& operator=(const CMap& copy) { \
-  MapImpl::operator=(copy);\
-  return *this; \
-} \
-};
-
-
-#define KEEP_NODE_MAP(GraphBase) \
-    template <typename V> class NodeMap \
-      : public GraphBase::template NodeMap<V> \
-    { \
-      typedef typename GraphBase::template NodeMap<V> MapImpl; \
-      typedef V Value; \
-    public: \
-      NodeMap() : MapImpl() {} \
-\
-      NodeMap(const Graph& graph) \
-	: MapImpl(static_cast<const GraphBase&>(graph)) { } \
-\
-      NodeMap(const Graph& graph, const Value& value) \
-	: MapImpl(static_cast<const GraphBase&>(graph), value) { } \
-\
-      NodeMap(const NodeMap& copy) \
-	: MapImpl(static_cast<const MapImpl&>(copy)) {} \
-\
-      template<typename CMap> \
-      NodeMap(const CMap& copy) \
-	: MapImpl(copy) {} \
-\
-      NodeMap& operator=(const NodeMap& copy) { \
-	MapImpl::operator=(static_cast<const MapImpl&>(copy)); \
-	return *this; \
-      } \
-\
-      template <typename CMap> \
-      NodeMap& operator=(const CMap& copy) { \
-	MapImpl::operator=(copy); \
-	return *this; \
-      } \
-    };
-
-#define KEEP_EDGE_MAP(GraphBase) \
-    template <typename V> class EdgeMap \
-      : public GraphBase::template EdgeMap<V> \
-    { \
-      typedef typename GraphBase::template EdgeMap<V> MapImpl; \
-      typedef V Value; \
-    public: \
-      EdgeMap() : MapImpl() {} \
-\
-      EdgeMap(const Graph& graph) \
-	: MapImpl(static_cast<const GraphBase&>(graph)) { } \
-\
-      EdgeMap(const Graph& graph, const Value& value) \
-	: MapImpl(static_cast<const GraphBase&>(graph), value) { } \
-\
-      EdgeMap(const EdgeMap& copy) \
-	: MapImpl(static_cast<const MapImpl&>(copy)) {} \
-\
-      template<typename CMap> \
-      EdgeMap(const CMap& copy) \
-	: MapImpl(copy) {} \
-\
-      EdgeMap& operator=(const EdgeMap& copy) { \
-	MapImpl::operator=(static_cast<const MapImpl&>(copy)); \
-	return *this; \
-      } \
-\
-      template <typename CMap> \
-      EdgeMap& operator=(const CMap& copy) { \
-	MapImpl::operator=(copy); \
-	return *this; \
-      } \
-    };
-
+#define CREATE_SYM_EDGE_MAP(DynMap) \
+template <typename Value> \
+class SymEdgeMap : public SymMap<DynMap, SymEdgeMapRegistry, Value> { \
+  typedef SymMap<DynMap, SymEdgeMapRegistry, Value> MapImpl; \
+ public: \
+\
+  SymEdgeMap() {} \
+\
+  SymEdgeMap(const typename MapImpl::Graph& g) \
+    : MapImpl(g, g.sym_edge_maps) {} \
+\
+  SymEdgeMap(const typename MapImpl::Graph& g, const Value& v) \
+    : MapImpl(g, g.sym_edge_maps, v) {} \
+\
+  SymEdgeMap(const SymEdgeMap& copy) \
+    : MapImpl(static_cast<const MapImpl&>(copy)) {} \
+\
+  template <typename CMap> SymEdgeMap(const CMap& copy) : MapImpl(copy) {} \
+  SymEdgeMap& operator=(const SymEdgeMap& copy) { \
+    MapImpl::operator=(static_cast<const MapImpl&>(copy));\
+    return *this; \
+  } \
+\
+  template <typename CMap> SymEdgeMap& operator=(const CMap& copy) { \
+    MapImpl::operator=(copy);\
+    return *this; \
+  } \
+};
+
+
+/** This is a macro to import an node map into a graph class.
+ */
+#define IMPORT_NODE_MAP(From, from, To, to) \
+template <typename Value> \
+class NodeMap \
+  : public From::template NodeMap<Value> { \
+  typedef typename From::template NodeMap<Value> MapImpl; \
+ public: \
+   NodeMap() : MapImpl() {} \
+\
+   NodeMap(const To& to) \
+     : MapImpl(static_cast<const From&>(from)) { } \
+\
+   NodeMap(const To& to, const Value& value) \
+     : MapImpl(static_cast<const From&>(from), value) { } \
+\
+   NodeMap(const NodeMap& copy) \
+     : MapImpl(static_cast<const MapImpl&>(copy)) {} \
+\
+   template<typename CMap> \
+   NodeMap(const CMap& copy) \
+     : MapImpl(copy) {} \
+\
+   NodeMap& operator=(const NodeMap& copy) { \
+     MapImpl::operator=(static_cast<const MapImpl&>(copy)); \
+     return *this; \
+   } \
+\
+   template <typename CMap> \
+   NodeMap& operator=(const CMap& copy) { \
+     MapImpl::operator=(copy); \
+     return *this; \
+   } \
+};
+
+/** This is a macro to import an edge map into a graph class.
+ */
+#define IMPORT_EDGE_MAP(From, from, To, to) \
+template <typename Value> \
+class EdgeMap \
+  : public From::template EdgeMap<Value> { \
+  typedef typename From::template EdgeMap<Value> MapImpl; \
+ public: \
+   EdgeMap() : MapImpl() {} \
+\
+   EdgeMap(const To& to) \
+     : MapImpl(static_cast<const From&>(from)) { } \
+\
+   EdgeMap(const To& to, const Value& value) \
+     : MapImpl(static_cast<const From&>(from), value) { } \
+\
+   EdgeMap(const EdgeMap& copy) \
+     : MapImpl(static_cast<const MapImpl&>(copy)) {} \
+\
+   template<typename CMap> \
+   EdgeMap(const CMap& copy) \
+     : MapImpl(copy) {} \
+\
+   EdgeMap& operator=(const EdgeMap& copy) { \
+     MapImpl::operator=(static_cast<const MapImpl&>(copy)); \
+     return *this; \
+   } \
+\
+   template <typename CMap> \
+   EdgeMap& operator=(const CMap& copy) { \
+     MapImpl::operator=(copy); \
+     return *this; \
+   } \
+};
+
+
+/** This is a macro to keep the node and edge maps for a graph class.
+ */
+#define KEEP_MAPS(From, To) \
+IMPORT_EDGE_MAP(From, graph, To, graph) \
+IMPORT_NODE_MAP(From, graph, To, graph)
   
 /// @}
Index: src/hugo/map_iterator.h
===================================================================
--- src/hugo/map_iterator.h	(revision 822)
+++ src/hugo/map_iterator.h	(revision 822)
@@ -0,0 +1,243 @@
+// -*- c++ -*-
+#ifndef MAP_ITERATOR_H
+#define MAP_ITERATOR_H
+
+#include <hugo/extended_pair.h>
+
+namespace hugo {
+
+
+  template <typename Map>
+  class MapIterator;
+
+  template <typename Map>
+  class MapConstIterator;
+
+  /** Compatible iterator with the stl maps' iterators.
+   *  It iterates on pairs of a key and a value.
+   */
+  template <typename Map>  
+  class MapIterator {
+    //    friend class Map;
+    friend class MapConstIterator<Map>;
+
+  public:
+
+    /// The key type of the iterator.
+    typedef typename Map::KeyType KeyType;
+    /// The iterator to iterate on the keys.
+    typedef typename Map::KeyIt KeyIt;
+
+    /// The value type of the iterator.
+    typedef typename Map::ValueType ValueType;
+    /// The reference type of the iterator.
+    typedef typename Map::ReferenceType ReferenceType;
+    /// The pointer type of the iterator.
+    typedef typename Map::PointerType PointerType;
+
+    /// The const value type of the iterator.
+    typedef typename Map::ConstValueType ConstValueType;
+    /// The const reference type of the iterator.
+    typedef typename Map::ConstReferenceType ConstReferenceType;
+    /// The pointer type of the iterator.
+    typedef typename Map::ConstPointerType ConstPointerType;
+    
+  public:
+
+    /** Constructor to initalize the the iterators returned
+     *  by the begin() and end().
+     */
+    MapIterator (Map& pmap, const KeyIt& pit) 
+      : map(&pmap), it(pit) {}
+
+  public:
+
+    /** Default constructor. 
+     */
+    MapIterator() {}
+
+    typedef extended_pair<const KeyType&, const KeyType&, 
+      ReferenceType, ReferenceType> PairReferenceType;
+
+    /** Dereference operator for map.
+     */	 
+    PairReferenceType operator*() {
+      return PairReferenceType(it, (*map)[it]);
+    }
+
+    class PairPointerType {
+      friend class MapIterator;
+    private:
+      PairReferenceType data;
+      PairPointerType(const KeyType& key, ReferenceType val) 
+	: data(key, val) {}
+    public:
+      PairReferenceType* operator->() {return &data;}
+    };
+
+    /** Arrow operator for map.
+     */	 
+    PairPointerType operator->() {
+      return PairPointerType(it, ((*map)[it])); 
+    }
+
+    /** The pre increment operator of the map.
+     */
+    MapIterator& operator++() { 
+      ++it; 
+      return *this; 
+    }
+
+    /** The post increment operator of the map.
+     */
+    MapIterator operator++(int) { 
+      MapIterator tmp(it); 
+      ++it; 
+      return tmp; 
+    }
+
+    /** The equality operator of the map.
+     */
+    bool operator==(const MapIterator& p_it) const {
+      return p_it.it == it;
+    }
+	
+    /** The not-equality operator of the map.
+     */
+    bool operator!=(const MapIterator& p_it) const {
+      return !(*this == p_it);
+    }
+
+    /** The equality operator of the map.
+     */
+    bool operator==(const MapConstIterator<Map>& p_it) const {
+      return p_it.it == it;
+    }
+	
+    /** The not-equality operator of the map.
+     */
+    bool operator!=(const MapConstIterator<Map>& p_it) const {
+      return !(*this == p_it);
+    }
+	
+  private:
+    Map* map;
+    KeyIt it;
+  };
+
+  /** Compatible iterator with the stl maps' iterators.
+   *  It iterates on pairs of a key and a value.
+   */
+  template <typename Map>
+  class MapConstIterator {
+    // friend class Map;
+    friend class MapIterator<Map>;
+
+  public:
+
+    /// The key type of the iterator.
+    typedef typename Map::KeyType KeyType;
+    /// The iterator to iterate on the keys.
+    typedef typename Map::KeyIt KeyIt;
+
+    /// The value type of the iterator.
+    typedef typename Map::ValueType ValueType;
+    /// The reference type of the iterator.
+    typedef typename Map::ReferenceType ReferenceType;
+    /// The pointer type of the iterator.
+    typedef typename Map::PointerType PointerType;
+
+    /// The const value type of the iterator.
+    typedef typename Map::ConstValueType ConstValueType;
+    /// The const reference type of the iterator.
+    typedef typename Map::ConstReferenceType ConstReferenceType;
+    /// The pointer type of the iterator.
+    typedef typename Map::ConstPointerType ConstPointerType;
+
+  public:    
+
+    /** Constructor to initalize the the iterators returned
+     *  by the begin() and end().
+     */
+
+    MapConstIterator (const Map& pmap, const KeyIt& pit) 
+      : map(&pmap), it(pit) {}
+
+  public:
+
+    /** Default constructor. 
+     */
+    MapConstIterator() {}
+
+    typedef extended_pair<const KeyType&, const KeyType&, 
+      ConstReferenceType, ConstReferenceType> PairReferenceType;
+
+    /** Dereference operator for map.
+     */	 
+    PairReferenceType operator*() {
+      return PairReferenceType(it, (*map)[it]);
+    }
+
+    class PairPointerType {
+      friend class MapConstIterator;
+    private:
+      PairReferenceType data;
+      PairPointerType(const KeyType& key, ConstReferenceType val) 
+	: data(key, val) {}
+    public:
+      PairReferenceType* operator->() {return &data;}
+    };
+
+    /** Arrow operator for map.
+     */	 
+    PairPointerType operator->() {
+      return PairPointerType(it, ((*map)[it])); 
+    }
+
+    /** The pre increment operator of the map.
+     */
+    MapConstIterator& operator++() { 
+      ++it; 
+      return *this; 
+    }
+
+    /** The post increment operator of the map.
+     */
+    MapConstIterator operator++(int) { 
+      MapConstIterator<Map> tmp(it); 
+      ++it; 
+      return tmp; 
+    }
+
+    /** The equality operator of the map.
+     */
+    bool operator==(const MapIterator<Map>& p_it) const {
+      return p_it.it == it;
+    }
+	
+    /** The not-equality operator of the map.
+     */
+    bool operator!=(const MapIterator<Map>& p_it) const {
+      return !(*this == p_it);
+    }
+
+    /** The equality operator of the map.
+     */
+    bool operator==(const MapConstIterator& p_it) const {
+      return p_it.it == it;
+    }
+	
+    /** The not-equality operator of the map.
+     */
+    bool operator!=(const MapConstIterator& p_it) const {
+      return !(*this == p_it);
+    }
+	
+  private:
+    const Map* map;
+    KeyIt it;
+  };
+
+}
+
+#endif
Index: src/hugo/map_registry.h
===================================================================
--- src/hugo/map_registry.h	(revision 786)
+++ src/hugo/map_registry.h	(revision 822)
@@ -29,6 +29,4 @@
     typedef KIt KeyIt;
 	
-
-
     /**
      * MapBase is the base class of the registered maps.
Index: src/hugo/smart_graph.h
===================================================================
--- src/hugo/smart_graph.h	(revision 813)
+++ src/hugo/smart_graph.h	(revision 822)
@@ -13,6 +13,7 @@
 #include <hugo/invalid.h>
 
-#include <hugo/default_map_factory.h>
-#include <hugo/sym_map_factory.h>
+#include <hugo/default_map.h>
+#include <hugo/sym_map.h>
+
 #include <hugo/map_registry.h>
 
@@ -73,6 +74,8 @@
     class InEdgeIt;
     
+    /// Creating map registries.
     CREATE_MAP_REGISTRIES;
-    CREATE_MAPS(DefaultMapFactory);
+    /// Creating node and edge maps.
+    CREATE_MAPS(DefaultMap);
     
   public:
@@ -315,10 +318,12 @@
     typedef SymSmartGraph Graph;
 
-    KEEP_NODE_MAP(SmartGraph);
-    KEEP_EDGE_MAP(SmartGraph);
-
+    /// Importing maps from the base class ListGraph.
+    KEEP_MAPS(SmartGraph, SymSmartGraph);
+
+    /// Creating symmetric map registry.
     CREATE_SYM_EDGE_MAP_REGISTRY;
-    CREATE_SYM_EDGE_MAP_FACTORY(DefaultMapFactory);
-    IMPORT_SYM_EDGE_MAP(SymEdgeMapFactory);
+    /// Creating symmetric edge map.
+    CREATE_SYM_EDGE_MAP(DefaultMap);
+
 
     SymSmartGraph() : SmartGraph() { }
Index: src/hugo/sym_map.h
===================================================================
--- src/hugo/sym_map.h	(revision 822)
+++ src/hugo/sym_map.h	(revision 822)
@@ -0,0 +1,170 @@
+// -*- c++ -*-
+#ifndef SYM_MAP_H
+#define SYM_MAP_H
+
+///\ingroup graphmaps
+///\file
+///\brief Graph maps that construates and destruates
+///their elements dynamically.
+
+namespace hugo {
+
+/// \addtogroup graphmaps
+/// @{
+
+  /** The SymEdgeIt is wrapper class for the EdgeIt. It can be used to
+   *  iterate on the symmetric maps when all of the edge - reverse edge pair
+   *  has different parity.
+   */
+
+  template <typename Graph, typename Edge, typename EdgeIt>
+  class SymEdgeIt : public EdgeIt {
+  public:
+
+    /** Default constructor.
+     */
+    SymEdgeIt() 
+      : EdgeIt() {}
+
+    /** Graph initialized constructor.
+     */
+    SymEdgeIt(const Graph& graph) 
+      : EdgeIt(graph) {
+      while ( (n & 1) && n != -1) {
+	EdgeIt::operator++();
+      }
+    }
+
+    /** Creating invelid SymEdgeIt.
+     */
+    SymEdgeIt(Invalid invalid) 
+      : EdgeIt(invalid) {}
+
+    /** SymEdgeIt from the given Edge.
+     */
+    SymEdgeIt(const Graph& graph, const Edge& edge)
+      : EdgeIt(graph, edge) {
+      while ( (n & 1) && n != -1) {
+	EdgeIt::operator++();
+      }
+    }
+
+    /** Increase operator.
+     */
+    SymEdgeIt& operator++() {
+      EdgeIt::operator++();
+      while ( (n & 1) && n != -1) {
+	EdgeIt::operator++();
+      }
+      return *this;
+    }
+  };
+
+  /** The SymMap template class is graph map structure what
+   *  wraps an other map structure to use as symmetric map structure.
+   *
+   *  The template parameter is the MapRegistry that the maps
+   *  will belong to and the ValueType.
+   */
+  template <template <typename, typename> class DynMap, 
+	    typename MapRegistry, typename Value>
+  class SymMap : public DynMap<MapRegistry, Value>{
+
+  private:
+
+    typedef DynMap<MapRegistry, Value> MapImpl;
+
+  public:
+		
+    /// The graph type of the maps. 
+    typedef typename MapRegistry::Graph Graph;
+
+    typedef typename MapImpl::KeyType KeyType;
+
+  public:
+
+
+    /** Default constructor for the map.
+     */
+    SymMap() : MapImpl() {}
+
+    /** Graph and Registry initialized map constructor.
+     */
+    SymMap(const Graph& g, MapRegistry& r) : MapImpl(g, r) {}
+
+    /** Constructor to use default value to initialize the map. 
+     */
+    SymMap(const Graph& g, MapRegistry& r, const Value& v) 
+      : MapImpl(g, r, v) {}
+
+    /** Constructor to copy a map of the same map type.
+     */
+    SymMap(const SymMap& copy) 
+      : MapImpl(static_cast<const MapImpl&>(copy)) {}
+
+    /** Constructor to copy a map of an other map type.
+     */
+    template <typename CMap> SymMap(const CMap& copy) 
+      : MapImpl(copy) {}
+
+    /** Assign operator to copy a map of the same map type.
+     */
+    SymMap& operator=(const SymMap& copy) {
+      MapImpl::operator=(static_cast<const MapImpl&>(copy));
+      return *this;
+    }
+
+    /** Assign operator to copy a map of an other map type.
+     */
+    template <typename CMap> SymMap& operator=(const CMap& copy) {
+      MapImpl::operator=(copy);
+      return *this;
+    }
+   
+    /**
+     * The subscript operator. The map can be subscripted by the
+     * actual keys of the graph. 
+     */
+    typename MapImpl::ReferenceType operator[](const KeyType& key) {
+      int id = MapImpl::getGraph()->id(key);	
+      return MapImpl::operator[](id >> 1);
+    } 
+		
+    /**
+     * The const subscript operator. The map can be subscripted by the
+     * actual keys of the graph. 
+     */
+    typename MapImpl::ConstReferenceType operator[](const KeyType& key) const {
+      int id = MapImpl::getGraph()->id(key);
+      return MapImpl::operator[](id >> 1);
+    }
+	
+    /** Setter function of the map. Equivalent with map[key] = val.
+     *  This is a compatibility feature with the not dereferable maps.
+     */
+    void set(const KeyType& key, const typename MapImpl::ValueType& val) {
+      int id = MapImpl::getGraph()->id(key);
+      MapImpl::operator[](id >> 1) = val;
+    }
+		
+    /** Add a new key to the map. It called by the map registry.
+     */
+    void add(const KeyType& key) {
+      int id = MapImpl::getGraph()->id(key);
+      if (id & 1) return;
+      MapImpl::add(key);
+    }
+		
+    /** Erase a key from the map. It called by the map registry.
+     */
+    void erase(const KeyType& key) {
+      int id = MapImpl::getGraph()->id(key);
+      if (id & 1) return;
+      MapImpl::add(key);
+    }
+  };
+
+  /// @}
+}
+
+#endif
Index: src/hugo/vector_map.h
===================================================================
--- src/hugo/vector_map.h	(revision 822)
+++ src/hugo/vector_map.h	(revision 822)
@@ -0,0 +1,216 @@
+// -*- c++ -*-
+#ifndef VECTOR_MAP_H
+#define VECTOR_MAP_H
+
+#include <vector>
+
+#include <hugo/map_iterator.h>
+
+///\ingroup graphmaps
+///\file
+///\brief Vector based graph maps.
+
+namespace hugo {
+  
+  /// \addtogroup graphmaps
+  /// @{
+  
+  /** 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. This map factory
+   *  uses the std::vector to implement the container function.
+   *
+   *  The template parameter is the MapRegistry that the maps
+   *  will belong to and the ValueType.
+   * 
+   * \todo It should use a faster initialization using the maxNodeId() or
+   * maxEdgeId() function of the graph instead of iterating through each
+   * edge/node.
+   */
+	
+  template <typename MapRegistry, typename Value>
+  class VectorMap : public MapRegistry::MapBase {
+  public:
+		
+    /// The graph type of the maps. 
+    typedef typename MapRegistry::Graph Graph;
+    /// The key type of the maps.
+    typedef typename MapRegistry::KeyType KeyType;
+    /// The iterator to iterate on the keys.
+    typedef typename MapRegistry::KeyIt KeyIt;
+
+    /// The map type.
+    typedef VectorMap Map;
+    /// The MapBase of the Map which implements the core regisitry function.
+    typedef typename MapRegistry::MapBase MapBase;
+
+  private:
+		
+    /// The container type of the map.
+    typedef std::vector<Value> Container;	
+
+  public:
+
+
+    /// The value type of the map.
+    typedef Value ValueType;
+    /// The reference type of the map;
+    typedef typename Container::reference ReferenceType;
+    /// The pointer type of the map;
+    typedef typename Container::pointer PointerType;
+
+    /// The const value type of the map.
+    typedef const Value ConstValueType;
+    /// The const reference type of the map;
+    typedef typename Container::const_reference ConstReferenceType;
+    /// The pointer type of the map;
+    typedef typename Container::const_pointer ConstPointerType;
+
+    /** Default constructor for the map.
+     */
+    VectorMap() {}
+		
+    /** Graph and Registry initialized map constructor.
+     */
+    VectorMap(const Graph& g, MapRegistry& r) : MapBase(g, r) {
+      init();
+    }
+
+    /** Constructor to use default value to initialize the map. 
+     */
+    VectorMap(const Graph& g, MapRegistry& r, const Value& v) 
+      : MapBase(g, r) {
+      for (KeyIt it(*getGraph()); it != INVALID; ++it) {
+	int id = getGraph()->id(it);
+	if (id >= (int)container.size()) {
+	  container.resize(id + 1);
+	}
+	set(it, v);
+      }
+    }
+
+    /** Constructor to copy a map of an other map type.
+     */
+    template <typename CMap> VectorMap(const CMap& copy) : MapBase(copy) {
+      if (getGraph()) {
+	for (KeyIt it(*getGraph()); it != INVALID; ++it) {
+	  int id = getGraph()->id(it);
+	  if (id >= (int)container.size()) {
+	    container.resize(id + 1);
+	  }
+	  set(it, copy[it]);
+	}
+      }
+    }
+
+    /** Assign operator to copy a map an other map type.
+     */
+    template <typename CMap> VectorMap& operator=(const CMap& copy) {
+      if (getGraph()) {
+	destroy();
+      } 
+      this->MapBase::operator=(copy);
+      if (getGraph()) {
+	for (KeyIt it(*getGraph()); it != INVALID; ++it) {
+	  int id = getGraph()->id(it);
+	  if (id >= (int)container.size()) {
+	    container.resize(id + 1);
+	  }
+	  set(it, copy[it]);
+	}
+      }
+      return *this;
+    }
+
+    /** The destructor of the map.
+     */
+    virtual ~VectorMap() {
+    }
+		
+    /**
+     * The subscript operator. The map can be subscripted by the
+     * actual keys of the graph. 
+     */
+    ReferenceType operator[](const KeyType& key) {
+      int id = getGraph()->id(key);
+      return container[id];
+    } 
+		
+    /**
+     * The const subscript operator. The map can be subscripted by the
+     * actual keys of the graph. 
+     */
+    ConstReferenceType operator[](const KeyType& key) const {
+      int id = getGraph()->id(key);
+      return container[id];
+    }
+
+    /** Setter function of the map. Equivalent with map[key] = val.
+     *  This is a compatibility feature with the not dereferable maps.
+     */
+    void set(const KeyType& key, const ValueType& val) {
+      int id = getGraph()->id(key);
+      container[id] = val;
+    }
+		
+    /** Add a new key to the map. It called by the map registry.
+     */
+    void add(const KeyType& key) {
+      int id = getGraph()->id(key);
+      if (id >= (int)container.size()) {
+	container.resize(id + 1);
+      }
+    }
+		
+    /** Erase a key from the map. It called by the map registry.
+     */
+    void erase(const KeyType& key) {}
+
+    /** Clear the data structure.
+     */
+    void clear() { 
+      container.clear();
+    }
+
+    /// The stl compatible pair iterator of the map.
+    typedef MapIterator<VectorMap> Iterator;
+    /// The stl compatible const pair iterator of the map.
+    typedef MapConstIterator<VectorMap> ConstIterator;
+
+    /** Returns the begin iterator of the map.
+     */
+    Iterator begin() {
+      return Iterator(*this, KeyIt(*MapBase::getGraph()));
+    }
+
+    /** Returns the end iterator of the map.
+     */
+    Iterator end() {
+      return Iterator(*this, INVALID);
+    }
+
+    /** Returns the begin ConstIterator of the map.
+     */
+    ConstIterator begin() const {
+      return ConstIterator(*this, KeyIt(*MapBase::getGraph()));
+    }
+
+    /** Returns the end const_iterator of the map.
+     */
+    ConstIterator end() const {
+      return ConstIterator(*this, INVALID);
+    }
+
+  private:
+		
+    Container container;
+
+		
+  };
+  
+  /// @}
+  
+}
+
+#endif
Index: c/hugo/vector_map_factory.h
===================================================================
--- src/hugo/vector_map_factory.h	(revision 817)
+++ 	(revision )
@@ -1,373 +1,0 @@
-// -*- c++ -*-
-#ifndef VECTOR_MAP_H
-#define VECTOR_MAP_H
-
-#include <vector>
-
-#include <hugo/extended_pair.h>
-
-///\ingroup graphmapfactory
-///\file
-///\brief Vector based graph maps.
-
-namespace hugo {
-  
-  /// \addtogroup graphmapfactory
-  /// @{
-  
-  /** The VectorMapFactory template class is a factory class
-   *  to create maps for the edge and nodes. This map factory
-   *  uses the std::vector to implement the container function.
-   *
-   *  The template parameter is the MapRegistry that the maps
-   *  will belong to.
-   * 
-   * \todo It should use a faster initialization using the maxNodeId() or
-   * maxEdgeId() function of the graph istead of iterating through each
-   * edge/node.
-   */
-	
-  template <typename MapRegistry>
-  class VectorMapFactory {
-  public:
-		
-    /// The graph type of the maps. 
-    typedef typename MapRegistry::Graph Graph;
-    /// The key type of the maps.
-    typedef typename MapRegistry::KeyType KeyType;
-    /// The iterator to iterate on the keys.
-    typedef typename MapRegistry::KeyIt KeyIt;
-
-    /// The MapBase of the Map which imlements the core regisitry function.
-    typedef typename MapRegistry::MapBase MapBase;
-
-		
-    /** The template Map type.
-     */
-    template <typename V> 
-    class Map : public MapBase {
-
-      typedef std::vector<V> Container;	
-
-    public:
-
-      /// The value type of the map.
-      typedef V ValueType;
-
-      /// The value type of the map.
-      typedef V Value;
-      /// The reference type of the map;
-      typedef typename Container::reference Reference;
-      /// The pointer type of the map;
-      typedef typename Container::pointer Pointer;
-
-      /// The const value type of the map.
-      typedef const Value ConstValue;
-      /// The const reference type of the map;
-      typedef typename Container::const_reference ConstReference;
-      /// The pointer type of the map;
-      typedef typename Container::const_pointer ConstPointer;
-
-      /** Default constructor for the map.
-       */
-      Map() {}
-		
-      /** Graph and Registry initialized map constructor.
-       */
-      Map(const Graph& g, MapRegistry& r) : MapBase(g, r) {
-	init();
-      }
-
-      /** Constructor to use default value to initialize the map. 
-       */
-      Map(const Graph& g, MapRegistry& r, const Value& v) : MapBase(g, r) {
-	for (KeyIt it(*getGraph()); it != INVALID; ++it) {
-          int id = getGraph()->id(it);
-	  if (id >= (int)container.size()) {
-	    container.resize(id + 1);
-	  }
-	  set(it, v);
-        }
-      }
-
-      /** Constructor to copy a map of an other map type.
-       */
-      template <typename CMap> Map(const CMap& copy) : MapBase(copy) {
-	if (getGraph()) {
-	  for (KeyIt it(*getGraph()); it != INVALID; ++it) {
-	    int id = getGraph()->id(it);
-	    if (id >= (int)container.size()) {
-	      container.resize(id + 1);
-	    }
-	    set(it, copy[it]);
-	  }
-	}
-      }
-
-      /** Assign operator to copy a map an other map type.
-       */
-      template <typename CMap> Map& operator=(const CMap& copy) {
-	if (getGraph()) {
-	  destroy();
-	} 
-	this->MapBase::operator=(copy);
-	if (getGraph()) {
-	  for (KeyIt it(*getGraph()); it != INVALID; ++it) {
-	    int id = getGraph()->id(it);
-	    if (id >= (int)container.size()) {
-	      container.resize(id + 1);
-	    }
-	    set(it, copy[it]);
-	  }
-	}
-	return *this;
-      }
-
-      /** The destructor of the map.
-       */
-      virtual ~Map() {
-      }
-		
-      /**
-       * The subscript operator. The map can be subscripted by the
-       * actual keys of the graph. 
-       */
-      Reference operator[](const KeyType& key) {
-	int id = getGraph()->id(key);
-	return container[id];
-      } 
-		
-      /**
-       * The const subscript operator. The map can be subscripted by the
-       * actual keys of the graph. 
-       */
-      ConstReference operator[](const KeyType& key) const {
-	int id = getGraph()->id(key);
-	return container[id];
-      }
-
-      /** Setter function of the map. Equivalent with map[key] = val.
-       *  This is a compatibility feature with the not dereferable maps.
-       */
-      void set(const KeyType& key, const Value& val) {
-	int id = getGraph()->id(key);
-	container[id] = val;
-      }
-		
-      /** Add a new key to the map. It called by the map registry.
-       */
-      void add(const KeyType& key) {
-	int id = getGraph()->id(key);
-	if (id >= (int)container.size()) {
-	  container.resize(id + 1);
-	}
-      }
-		
-      /** Erase a key from the map. It called by the map registry.
-       */
-      void erase(const KeyType& key) {}
-
-      /** Clear the data structure.
-       */
-      void clear() { 
-	container.clear();
-      }
-
-      class iterator;
-      class const_iterator;
-
-      /** Compatible iterator with the stl maps' iterators.
-       *  It iterates on pairs of a key and a value.
-       */
-      class iterator {
-	friend class Map;
-	friend class const_iterator;
-      private:
-
-	/** Private constructor to initalize the the iterators returned
-	 *  by the begin() and end().
-	 */
-	iterator (Map& pmap, const KeyIt& pit) : map(&pmap), it(pit) {}
-
-      public:
-
-	/** Default constructor. 
-	 */
-	iterator() {}
-
-	typedef extended_pair<const KeyType&, const KeyType&, 
-			      Map::Reference, Map::Reference> Reference;
-
-	/** Dereference operator for map.
-	 */	 
-	Reference operator*() {
-	  return Reference(it, (*map)[it]);
-	}
-
-	class Pointer {
-	  friend class iterator;
-	private:
-	  Reference data;
-	  Pointer(const KeyType& key, Map::Reference val) : data(key, val) {}
-	public:
-	  Reference* operator->() {return &data;}
-	};
-
-	/** Arrow operator for map.
-	 */	 
-	Pointer operator->() {
-	  return Pointer(it, ((*map)[it])); 
-	}
-
-	/** The pre increment operator of the map.
-	 */
-	iterator& operator++() { 
-	  ++it; 
-	  return *this; 
-	}
-
-	/** The post increment operator of the map.
-	 */
-	iterator operator++(int) { 
-	  iterator tmp(it); 
-	  ++it; 
-	  return tmp; 
-	}
-
-	/** The equality operator of the map.
-	 */
-	bool operator==(const_iterator p_it) {
-	  return p_it.it == it;
-	}
-	
-	/** The not-equality operator of the map.
-	 */
-	bool operator!=(const_iterator p_it) {
-	  return !(*this == p_it);
-	}
-
-	
-      private:
-	Map* map;
-	KeyIt it;
-      };
-
-      /** Returns the begin iterator of the map.
-       */
-      iterator begin() {
-	return iterator(*this, KeyIt(*getGraph()));
-      }
-
-      /** Returns the end iterator of the map.
-       */
-      iterator end() {
-	return iterator(*this, INVALID);
-      }
-
-      class const_iterator {
-	friend class Map;
-	friend class iterator;
-      private:
-
-	/** Private constructor to initalize the the iterators returned
-	 *  by the begin() and end().
-	 */
-	const_iterator (const Map& pmap, const KeyIt& pit) 
-	  : map(&pmap), it(pit) {}
-
-      public:
-
-	/** Default constructor. 
-	 */
-	const_iterator() {}
-
-	/** Constructor to convert iterator to const_iterator.
-	 */
-	const_iterator(iterator p_it) : map(p_it.map), it(p_it.it) {}
-      
-	typedef extended_pair<const KeyType&, const KeyType&, 
-	  Map::ConstReference, Map::ConstReference> Reference;
-
-	/** Dereference operator for map.
-	 */	 
-	Reference operator*() {
-	  return Reference(it, (*map)[it]);
-	}
-
-
-	class Pointer {
-	  friend class const_iterator;
-	private:
-	  Reference data;
-	  Pointer(const KeyType& key, Map::ConstReference val) 
-	    : data(key, val) {}
-	public:
-	  Reference* operator->() {return &data;}
-	};
-
-	/** Arrow operator for map.
-	 */	 
-	Pointer operator->() {
-	  return Pointer(it, ((*map)[it])); 
-	}
-
-	/** The pre increment operator of the map.
-	 */
-	const_iterator& operator++() { 
-	  ++it; 
-	  return *this; 
-	}
-
-	/** The post increment operator of the map.
-	 */
-	const_iterator operator++(int) { 
-	  const_iterator tmp(it); 
-	  ++it; 
-	  return tmp; 
-	}
-
-	/** The equality operator of the map.
-	 */
-	bool operator==(const_iterator p_it) {
-	  return p_it.it == it;
-	}
-	
-	/** The not-equality operator of the map.
-	 */
-	bool operator!=(const_iterator p_it) {
-	  return !(*this == p_it);
-	}
-	
-
-      private:
-	const Map* map;
-	KeyIt it;
-      };
-
-      /** Returns the begin const_iterator of the map.
-       */
-      const_iterator begin() const {
-	return const_iterator(*this, KeyIt(*getGraph()));
-      }
-
-      /** Returns the end const_iterator of the map.
-       */
-      const_iterator end() const {
-	return const_iterator(*this, INVALID);
-      }
-
-      private:
-		
-      Container container;
-
-    };
-		
-  };
-
-  
-  /// @}
-  
-
-}
-
-#endif
