COIN-OR::LEMON - Graph Library

Changeset 1999:2ff283124dfc in lemon-0.x for lemon/list_graph.h


Ignore:
Timestamp:
03/06/06 11:28:37 (18 years ago)
Author:
Balazs Dezso
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2609
Message:

Clarifing alteration observing system
It is directly connected now to a container

File:
1 edited

Legend:

Unmodified
Added
Removed
  • lemon/list_graph.h

    r1995 r1999  
    2424///\brief ListGraph, ListUGraph classes.
    2525
     26#include <lemon/bits/base_extender.h>
    2627#include <lemon/bits/graph_extender.h>
    2728
     
    321322  ///\sa concept::ErasableGraph.
    322323
    323   class ListGraph : public ExtendedListGraphBase
    324   {
     324  class ListGraph : public ExtendedListGraphBase {
    325325  public:
     326
     327    typedef ExtendedListGraphBase Parent;
     328
    326329    /// Changes the target of \c e to \c n
    327330
     
    447450    ///\warning Edge and node deletions cannot be restored.
    448451    ///\warning Snapshots cannot be nested.
    449     class Snapshot : protected AlterationNotifier<Node>::ObserverBase,
    450                      protected AlterationNotifier<Edge>::ObserverBase
     452    class Snapshot : protected Parent::NodeNotifier::ObserverBase,
     453                     protected Parent::EdgeNotifier::ObserverBase
    451454    {
    452455    public:
     
    460463           
    461464
    462       protected:
     465    protected:
    463466     
    464467      ListGraph *g;
     
    491494      void regist(ListGraph &_g) {
    492495        g=&_g;
    493         AlterationNotifier<Node>::ObserverBase::
    494           attach(g->getNotifier(Node()));
    495         AlterationNotifier<Edge>::ObserverBase::
    496           attach(g->getNotifier(Edge()));
     496        Parent::NodeNotifier::ObserverBase::attach(g->getNotifier(Node()));
     497        Parent::EdgeNotifier::ObserverBase::attach(g->getNotifier(Edge()));
    497498      }
    498499           
    499500      void deregist() {
    500         AlterationNotifier<Node>::ObserverBase::
    501           detach();
    502         AlterationNotifier<Edge>::ObserverBase::
    503           detach();
     501        Parent::NodeNotifier::ObserverBase::detach();
     502        Parent::EdgeNotifier::ObserverBase::detach();
    504503        g=0;
    505504      }
Note: See TracChangeset for help on using the changeset viewer.