Index: lemon/bits/default_map.h
===================================================================
--- lemon/bits/default_map.h	(revision 1966)
+++ lemon/bits/default_map.h	(revision 1979)
@@ -23,4 +23,5 @@
 #include <lemon/bits/array_map.h>
 #include <lemon/bits/vector_map.h>
+#include <lemon/bits/static_map.h>
 
 ///\ingroup graphmapfactory
@@ -31,5 +32,6 @@
 namespace lemon {
   
-#ifndef GLIBCXX_DEBUG
+  
+#ifndef _GLIBCXX_DEBUG
 
   template <typename _Graph, typename _Item, typename _Value>
@@ -168,481 +170,4 @@
   };
 
-
-  /// \e
-  template <typename _Base> 
-  class MappableGraphExtender : public _Base {
-  public:
-
-    typedef MappableGraphExtender<_Base> Graph;
-    typedef _Base Parent;
-
-    typedef typename Parent::Node Node;
-    typedef typename Parent::NodeIt NodeIt;
-
-    typedef typename Parent::Edge Edge;
-    typedef typename Parent::EdgeIt EdgeIt;
-
-    
-    template <typename _Value>
-    class NodeMap 
-      : public IterableMapExtender<DefaultMap<Graph, Node, _Value> > {
-    public:
-      typedef MappableGraphExtender Graph;
-      typedef IterableMapExtender<DefaultMap<Graph, Node, _Value> > Parent;
-
-      NodeMap(const Graph& _g) 
-	: Parent(_g) {}
-      NodeMap(const Graph& _g, const _Value& _v) 
-	: Parent(_g, _v) {}
-
-      NodeMap& operator=(const NodeMap& cmap) {
-	return operator=<NodeMap>(cmap);
-      }
-
-
-      /// \brief Template assign operator.
-      ///
-      /// The given parameter should be conform to the ReadMap
-      /// concecpt and could be indiced by the current item set of
-      /// the NodeMap. In this case the value for each item
-      /// is assigned by the value of the given ReadMap. 
-      template <typename CMap>
-      NodeMap& operator=(const CMap& cmap) {
-	checkConcept<concept::ReadMap<Node, _Value>, CMap>();
-	const typename Parent::Graph* graph = Parent::getGraph();
-	Node it;
-	for (graph->first(it); it != INVALID; graph->next(it)) {
-	  Parent::set(it, cmap[it]);
-	}
-	return *this;
-      }
-
-    };
-
-    template <typename _Value>
-    class EdgeMap 
-      : public IterableMapExtender<DefaultMap<Graph, Edge, _Value> > {
-    public:
-      typedef MappableGraphExtender Graph;
-      typedef IterableMapExtender<DefaultMap<Graph, Edge, _Value> > Parent;
-
-      EdgeMap(const Graph& _g) 
-	: Parent(_g) {}
-      EdgeMap(const Graph& _g, const _Value& _v) 
-	: Parent(_g, _v) {}
-
-      EdgeMap& operator=(const EdgeMap& cmap) {
-	return operator=<EdgeMap>(cmap);
-      }
-
-      template <typename CMap>
-      EdgeMap& operator=(const CMap& cmap) {
-	checkConcept<concept::ReadMap<Edge, _Value>, CMap>();
-	const typename Parent::Graph* graph = Parent::getGraph();
-	Edge it;
-	for (graph->first(it); it != INVALID; graph->next(it)) {
-	  Parent::set(it, cmap[it]);
-	}
-	return *this;
-      }
-    };
-    
-  };
-
-  /// \e
-  template <typename _Base> 
-  class MappableEdgeSetExtender : public _Base {
-  public:
-
-    typedef MappableEdgeSetExtender<_Base> Graph;
-    typedef _Base Parent;
-
-    typedef typename Parent::Edge Edge;
-    typedef typename Parent::EdgeIt EdgeIt;
-
-    template <typename _Value>
-    class EdgeMap 
-      : public IterableMapExtender<DefaultMap<Graph, Edge, _Value> > {
-    public:
-      typedef MappableEdgeSetExtender Graph;
-      typedef IterableMapExtender<DefaultMap<Graph, Edge, _Value> > Parent;
-
-      EdgeMap(const Graph& _g) 
-	: Parent(_g) {}
-      EdgeMap(const Graph& _g, const _Value& _v) 
-	: Parent(_g, _v) {}
-
-      EdgeMap& operator=(const EdgeMap& cmap) {
-	return operator=<EdgeMap>(cmap);
-      }
-
-      template <typename CMap>
-      EdgeMap& operator=(const CMap& cmap) {
-	checkConcept<concept::ReadMap<Edge, _Value>, CMap>();
-	const typename Parent::Graph* graph = Parent::getGraph();
-	Edge it;
-	for (graph->first(it); it != INVALID; graph->next(it)) {
-	  Parent::set(it, cmap[it]);
-	}
-	return *this;
-      }
-    };
-    
-  };
-
-  /// \e
-  template <typename _Base> 
-  class MappableUGraphExtender : 
-    public MappableGraphExtender<_Base> {
-  public:
-
-    typedef MappableUGraphExtender Graph;
-    typedef MappableGraphExtender<_Base> Parent;
-
-    typedef typename Parent::UEdge UEdge;
-
-    template <typename _Value>
-    class UEdgeMap 
-      : public IterableMapExtender<DefaultMap<Graph, UEdge, _Value> > {
-    public:
-      typedef MappableUGraphExtender Graph;
-      typedef IterableMapExtender<
-	DefaultMap<Graph, UEdge, _Value> > Parent;
-
-      UEdgeMap(const Graph& _g) 
-	: Parent(_g) {}
-      UEdgeMap(const Graph& _g, const _Value& _v) 
-	: Parent(_g, _v) {}
-
-      UEdgeMap& operator=(const UEdgeMap& cmap) {
-	return operator=<UEdgeMap>(cmap);
-      }
-
-      template <typename CMap>
-      UEdgeMap& operator=(const CMap& cmap) {
-	checkConcept<concept::ReadMap<UEdge, _Value>, CMap>();
-	const typename Parent::Graph* graph = Parent::getGraph();
-	UEdge it;
-	for (graph->first(it); it != INVALID; graph->next(it)) {
-	  Parent::set(it, cmap[it]);
-	}
-	return *this;
-      }
-    };
-
-
-  };
-
-  /// \e
-  template <typename _Base> 
-  class MappableUEdgeSetExtender : 
-    public MappableEdgeSetExtender<_Base> {
-  public:
-
-    typedef MappableUEdgeSetExtender Graph;
-    typedef MappableEdgeSetExtender<_Base> Parent;
-
-    typedef typename Parent::UEdge UEdge;
-
-    template <typename _Value>
-    class UEdgeMap 
-      : public IterableMapExtender<DefaultMap<Graph, UEdge, _Value> > {
-    public:
-      typedef MappableUEdgeSetExtender Graph;
-      typedef IterableMapExtender<
-	DefaultMap<Graph, UEdge, _Value> > Parent;
-
-      UEdgeMap(const Graph& _g) 
-	: Parent(_g) {}
-      UEdgeMap(const Graph& _g, const _Value& _v) 
-	: Parent(_g, _v) {}
-
-      UEdgeMap& operator=(const UEdgeMap& cmap) {
-	return operator=<UEdgeMap>(cmap);
-      }
-
-      template <typename CMap>
-      UEdgeMap& operator=(const CMap& cmap) {
-	checkConcept<concept::ReadMap<UEdge, _Value>, CMap>();
-	const typename Parent::Graph* graph = Parent::getGraph();
-	UEdge it;
-	for (graph->first(it); it != INVALID; graph->next(it)) {
-	  Parent::set(it, cmap[it]);
-	}
-	return *this;
-      }
-    };
-
-
-  };
-
-
-  template <typename _Base>
-  class MappableBpUGraphExtender : public _Base {
-  public:
-
-    typedef _Base Parent;
-    typedef MappableBpUGraphExtender Graph;
-
-    typedef typename Parent::Node Node;
-    typedef typename Parent::ANode ANode;
-    typedef typename Parent::BNode BNode;
-    typedef typename Parent::Edge Edge;
-    typedef typename Parent::UEdge UEdge;
-    
-    template <typename _Value>
-    class ANodeMap 
-      : public IterableMapExtender<DefaultMap<Graph, ANode, _Value> > {
-    public:
-      typedef MappableBpUGraphExtender Graph;
-      typedef IterableMapExtender<DefaultMap<Graph, ANode, _Value> > 
-      Parent;
-    
-      ANodeMap(const Graph& _g) 
-	: Parent(_g) {}
-      ANodeMap(const Graph& _g, const _Value& _v) 
-	: Parent(_g, _v) {}
-    
-      ANodeMap& operator=(const ANodeMap& cmap) {
-	return operator=<ANodeMap>(cmap);
-      }
-    
-
-      /// \brief Template assign operator.
-      ///
-      /// The given parameter should be conform to the ReadMap
-      /// concept and could be indiced by the current item set of
-      /// the ANodeMap. In this case the value for each item
-      /// is assigned by the value of the given ReadMap. 
-      template <typename CMap>
-      ANodeMap& operator=(const CMap& cmap) {
-	checkConcept<concept::ReadMap<ANode, _Value>, CMap>();
-	const typename Parent::Graph* graph = Parent::getGraph();
-	ANode it;
-	for (graph->first(it); it != INVALID; graph->next(it)) {
-	  Parent::set(it, cmap[it]);
-	}
-	return *this;
-      }
-    
-    };
-
-    template <typename _Value>
-    class BNodeMap 
-      : public IterableMapExtender<DefaultMap<Graph, BNode, _Value> > {
-    public:
-      typedef MappableBpUGraphExtender Graph;
-      typedef IterableMapExtender<DefaultMap<Graph, BNode, _Value> > 
-      Parent;
-    
-      BNodeMap(const Graph& _g) 
-	: Parent(_g) {}
-      BNodeMap(const Graph& _g, const _Value& _v) 
-	: Parent(_g, _v) {}
-    
-      BNodeMap& operator=(const BNodeMap& cmap) {
-	return operator=<BNodeMap>(cmap);
-      }
-    
-
-      /// \brief Template assign operator.
-      ///
-      /// The given parameter should be conform to the ReadMap
-      /// concept and could be indiced by the current item set of
-      /// the BNodeMap. In this case the value for each item
-      /// is assigned by the value of the given ReadMap. 
-      template <typename CMap>
-      BNodeMap& operator=(const CMap& cmap) {
-	checkConcept<concept::ReadMap<BNode, _Value>, CMap>();
-	const typename Parent::Graph* graph = Parent::getGraph();
-	BNode it;
-	for (graph->first(it); it != INVALID; graph->next(it)) {
-	  Parent::set(it, cmap[it]);
-	}
-	return *this;
-      }
-    
-    };
-
-  protected:
-
-    template <typename _Value>
-    class NodeMapBase : public Parent::NodeNotifier::ObserverBase {
-    public:
-      typedef MappableBpUGraphExtender Graph;
-
-      typedef Node Key;
-      typedef _Value Value;
-
-      /// The reference type of the map;
-      typedef typename BNodeMap<_Value>::Reference Reference;
-      /// The pointer type of the map;
-      typedef typename BNodeMap<_Value>::Pointer Pointer;
-      
-      /// The const value type of the map.
-      typedef const Value ConstValue;
-      /// The const reference type of the map;
-      typedef typename BNodeMap<_Value>::ConstReference ConstReference;
-      /// The pointer type of the map;
-      typedef typename BNodeMap<_Value>::ConstPointer ConstPointer;
-
-      typedef True ReferenceMapTag;
-
-      NodeMapBase(const Graph& _g) 
-	: graph(&_g), bNodeMap(_g), aNodeMap(_g) {
-	Parent::NodeNotifier::ObserverBase::attach(_g.getNotifier(Node()));
-      }
-      NodeMapBase(const Graph& _g, const _Value& _v) 
-	: graph(&_g), bNodeMap(_g, _v), 
-	  aNodeMap(_g, _v) {
-	Parent::NodeNotifier::ObserverBase::attach(_g.getNotifier(Node()));
-      }
-
-      virtual ~NodeMapBase() {      
-	if (Parent::NodeNotifier::ObserverBase::attached()) {
-	  Parent::NodeNotifier::ObserverBase::detach();
-	}
-      }
-    
-      ConstReference operator[](const Key& node) const {
-	if (Parent::aNode(node)) {
-	  return aNodeMap[node];
-	} else {
-	  return bNodeMap[node];
-	}
-      } 
-
-      Reference operator[](const Key& node) {
-	if (Parent::aNode(node)) {
-	  return aNodeMap[node];
-	} else {
-	  return bNodeMap[node];
-	}
-      }
-
-      void set(const Key& node, const Value& value) {
-	if (Parent::aNode(node)) {
-	  aNodeMap.set(node, value);
-	} else {
-	  bNodeMap.set(node, value);
-	}
-      }
-
-    protected:
-      
-      virtual void add(const Node&) {}
-      virtual void add(const std::vector<Node>&) {}
-      virtual void erase(const Node&) {}
-      virtual void erase(const std::vector<Node>&) {}
-      virtual void clear() {}
-      virtual void build() {}
-
-      const Graph* getGraph() const { return graph; }
-      
-    private:
-      const Graph* graph;
-      BNodeMap<_Value> bNodeMap;
-      ANodeMap<_Value> aNodeMap;
-    };
-    
-  public:
-
-    template <typename _Value>
-    class NodeMap 
-      : public IterableMapExtender<NodeMapBase<_Value> > {
-    public:
-      typedef MappableBpUGraphExtender Graph;
-      typedef IterableMapExtender< NodeMapBase<_Value> > Parent;
-    
-      NodeMap(const Graph& _g) 
-	: Parent(_g) {}
-      NodeMap(const Graph& _g, const _Value& _v) 
-	: Parent(_g, _v) {}
-    
-      NodeMap& operator=(const NodeMap& cmap) {
-	return operator=<NodeMap>(cmap);
-      }
-    
-
-      /// \brief Template assign operator.
-      ///
-      /// The given parameter should be conform to the ReadMap
-      /// concept and could be indiced by the current item set of
-      /// the NodeMap. In this case the value for each item
-      /// is assigned by the value of the given ReadMap. 
-      template <typename CMap>
-      NodeMap& operator=(const CMap& cmap) {
-	checkConcept<concept::ReadMap<Node, _Value>, CMap>();
-	const typename Parent::Graph* graph = Parent::getGraph();
-	Node it;
-	for (graph->first(it); it != INVALID; graph->next(it)) {
-	  Parent::set(it, cmap[it]);
-	}
-	return *this;
-      }
-    
-    };
-
-
-
-    template <typename _Value>
-    class EdgeMap 
-      : public IterableMapExtender<DefaultMap<Graph, Edge, _Value> > {
-    public:
-      typedef MappableBpUGraphExtender Graph;
-      typedef IterableMapExtender<DefaultMap<Graph, Edge, _Value> > Parent;
-    
-      EdgeMap(const Graph& _g) 
-	: Parent(_g) {}
-      EdgeMap(const Graph& _g, const _Value& _v) 
-	: Parent(_g, _v) {}
-    
-      EdgeMap& operator=(const EdgeMap& cmap) {
-	return operator=<EdgeMap>(cmap);
-      }
-    
-      template <typename CMap>
-      EdgeMap& operator=(const CMap& cmap) {
-	checkConcept<concept::ReadMap<Edge, _Value>, CMap>();
-	const typename Parent::Graph* graph = Parent::getGraph();
-	Edge it;
-	for (graph->first(it); it != INVALID; graph->next(it)) {
-	  Parent::set(it, cmap[it]);
-	}
-	return *this;
-      }
-    };
-
-    template <typename _Value>
-    class UEdgeMap 
-      : public IterableMapExtender<DefaultMap<Graph, UEdge, _Value> > {
-    public:
-      typedef MappableBpUGraphExtender Graph;
-      typedef IterableMapExtender<DefaultMap<Graph, UEdge, _Value> > 
-      Parent;
-    
-      UEdgeMap(const Graph& _g) 
-	: Parent(_g) {}
-      UEdgeMap(const Graph& _g, const _Value& _v) 
-	: Parent(_g, _v) {}
-    
-      UEdgeMap& operator=(const UEdgeMap& cmap) {
-	return operator=<UEdgeMap>(cmap);
-      }
-    
-      template <typename CMap>
-      UEdgeMap& operator=(const CMap& cmap) {
-	checkConcept<concept::ReadMap<UEdge, _Value>, CMap>();
-	const typename Parent::Graph* graph = Parent::getGraph();
-	UEdge it;
-	for (graph->first(it); it != INVALID; graph->next(it)) {
-	  Parent::set(it, cmap[it]);
-	}
-	return *this;
-      }
-    };
-  
-  };
-
 }
 
