lemon/list_graph.h
changeset 1999 2ff283124dfc
parent 1995 c1fc2c14a3ae
child 2031 080d51024ac5
     1.1 --- a/lemon/list_graph.h	Mon Mar 06 09:38:19 2006 +0000
     1.2 +++ b/lemon/list_graph.h	Mon Mar 06 10:28:37 2006 +0000
     1.3 @@ -23,6 +23,7 @@
     1.4  ///\file
     1.5  ///\brief ListGraph, ListUGraph classes.
     1.6  
     1.7 +#include <lemon/bits/base_extender.h>
     1.8  #include <lemon/bits/graph_extender.h>
     1.9  
    1.10  #include <lemon/error.h>
    1.11 @@ -320,9 +321,11 @@
    1.12    ///it also provides several additional useful extra functionalities.
    1.13    ///\sa concept::ErasableGraph.
    1.14  
    1.15 -  class ListGraph : public ExtendedListGraphBase 
    1.16 -  {
    1.17 +  class ListGraph : public ExtendedListGraphBase {
    1.18    public:
    1.19 +
    1.20 +    typedef ExtendedListGraphBase Parent;
    1.21 +
    1.22      /// Changes the target of \c e to \c n
    1.23  
    1.24      /// Changes the target of \c e to \c n
    1.25 @@ -446,8 +449,8 @@
    1.26      ///
    1.27      ///\warning Edge and node deletions cannot be restored.
    1.28      ///\warning Snapshots cannot be nested.
    1.29 -    class Snapshot : protected AlterationNotifier<Node>::ObserverBase,
    1.30 -		     protected AlterationNotifier<Edge>::ObserverBase
    1.31 +    class Snapshot : protected Parent::NodeNotifier::ObserverBase,
    1.32 +		     protected Parent::EdgeNotifier::ObserverBase
    1.33      {
    1.34      public:
    1.35        
    1.36 @@ -459,7 +462,7 @@
    1.37        };
    1.38              
    1.39  
    1.40 -      protected:
    1.41 +    protected:
    1.42        
    1.43        ListGraph *g;
    1.44        std::list<Node> added_nodes;
    1.45 @@ -490,17 +493,13 @@
    1.46  
    1.47        void regist(ListGraph &_g) {
    1.48  	g=&_g;
    1.49 -	AlterationNotifier<Node>::ObserverBase::
    1.50 -	  attach(g->getNotifier(Node()));
    1.51 -	AlterationNotifier<Edge>::ObserverBase::
    1.52 -	  attach(g->getNotifier(Edge()));
    1.53 +	Parent::NodeNotifier::ObserverBase::attach(g->getNotifier(Node()));
    1.54 +	Parent::EdgeNotifier::ObserverBase::attach(g->getNotifier(Edge()));
    1.55        }
    1.56              
    1.57        void deregist() {
    1.58 -	AlterationNotifier<Node>::ObserverBase::
    1.59 -	  detach();
    1.60 -	AlterationNotifier<Edge>::ObserverBase::
    1.61 -	  detach();
    1.62 +	Parent::NodeNotifier::ObserverBase::detach();
    1.63 +	Parent::EdgeNotifier::ObserverBase::detach();
    1.64  	g=0;
    1.65        }
    1.66