diff -r 2ba916d7aae3 -r 2ff283124dfc lemon/list_graph.h --- a/lemon/list_graph.h Mon Mar 06 09:38:19 2006 +0000 +++ b/lemon/list_graph.h Mon Mar 06 10:28:37 2006 +0000 @@ -23,6 +23,7 @@ ///\file ///\brief ListGraph, ListUGraph classes. +#include #include #include @@ -320,9 +321,11 @@ ///it also provides several additional useful extra functionalities. ///\sa concept::ErasableGraph. - class ListGraph : public ExtendedListGraphBase - { + class ListGraph : public ExtendedListGraphBase { public: + + typedef ExtendedListGraphBase Parent; + /// Changes the target of \c e to \c n /// Changes the target of \c e to \c n @@ -446,8 +449,8 @@ /// ///\warning Edge and node deletions cannot be restored. ///\warning Snapshots cannot be nested. - class Snapshot : protected AlterationNotifier::ObserverBase, - protected AlterationNotifier::ObserverBase + class Snapshot : protected Parent::NodeNotifier::ObserverBase, + protected Parent::EdgeNotifier::ObserverBase { public: @@ -459,7 +462,7 @@ }; - protected: + protected: ListGraph *g; std::list added_nodes; @@ -490,17 +493,13 @@ void regist(ListGraph &_g) { g=&_g; - AlterationNotifier::ObserverBase:: - attach(g->getNotifier(Node())); - AlterationNotifier::ObserverBase:: - attach(g->getNotifier(Edge())); + Parent::NodeNotifier::ObserverBase::attach(g->getNotifier(Node())); + Parent::EdgeNotifier::ObserverBase::attach(g->getNotifier(Edge())); } void deregist() { - AlterationNotifier::ObserverBase:: - detach(); - AlterationNotifier::ObserverBase:: - detach(); + Parent::NodeNotifier::ObserverBase::detach(); + Parent::EdgeNotifier::ObserverBase::detach(); g=0; }