lemon/graph_adaptor.h
changeset 1999 2ff283124dfc
parent 1993 2115143eceea
child 2031 080d51024ac5
     1.1 --- a/lemon/graph_adaptor.h	Mon Mar 06 09:38:19 2006 +0000
     1.2 +++ b/lemon/graph_adaptor.h	Mon Mar 06 10:28:37 2006 +0000
     1.3 @@ -30,6 +30,7 @@
     1.4  #include <lemon/bits/invalid.h>
     1.5  #include <lemon/maps.h>
     1.6  
     1.7 +#include <lemon/bits/base_extender.h>
     1.8  #include <lemon/bits/graph_adaptor_extender.h>
     1.9  #include <lemon/bits/graph_extender.h>
    1.10  
    1.11 @@ -937,7 +938,7 @@
    1.12    protected:
    1.13  
    1.14      UndirGraphAdaptorBase() 
    1.15 -      : Parent(), edge_notifier(), edge_notifier_proxy(edge_notifier) {}
    1.16 +      : edge_notifier(*this), edge_notifier_proxy(edge_notifier) {}
    1.17  
    1.18      void setGraph(_Graph& graph) {
    1.19        Parent::setGraph(graph);
    1.20 @@ -947,7 +948,11 @@
    1.21    public:
    1.22  
    1.23      ~UndirGraphAdaptorBase() {
    1.24 -      getNotifier(Edge()).clear();
    1.25 +      edge_notifier.clear();
    1.26 +    }
    1.27 +
    1.28 +    int maxId(typename Parent::Edge) const {
    1.29 +      return Parent::maxEdgeId();
    1.30      }
    1.31  
    1.32  
    1.33 @@ -958,7 +963,7 @@
    1.34  
    1.35      using Parent::getNotifier;
    1.36  
    1.37 -    typedef AlterationNotifier<Edge> EdgeNotifier;
    1.38 +    typedef AlterationNotifier<UndirGraphAdaptorBase, Edge> EdgeNotifier;
    1.39      EdgeNotifier& getNotifier(Edge) const { return edge_notifier; }
    1.40  
    1.41    protected: