COIN-OR::LEMON - Graph Library

Changeset 1040:372f08e8f403 in lemon-0.x


Ignore:
Timestamp:
12/16/04 13:44:49 (16 years ago)
Author:
Balazs Dezso
Branch:
default
Phase:
public
Convert:
svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1430
Message:

AlterationObserverRegistry? -> AlterationNotifier?
third step

Location:
src/lemon
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/lemon/alteration_notifier.h

    r1039 r1040  
    193193               
    194194    /// Assign operator for the AlterationNotifier.
    195     /// It makes the registry only empty because the copiable
    196     /// registry's observers have to be registered still into that registry.
     195    /// It makes the notifier only empty because the copiable
     196    /// notifier's observers have to be registered still into that registry.
    197197    AlterationNotifier& operator=(const AlterationNotifier&) {
    198198      typename Container::iterator it;
     
    316316  protected:
    317317
    318     mutable EdgeNotifier edge_observers;
    319 
    320     mutable NodeNotifier node_observers;
     318    mutable EdgeNotifier edge_notifier;
     319
     320    mutable NodeNotifier node_notifier;
    321321
    322322  public:
    323323
    324324    EdgeNotifier& getNotifier(Edge = INVALID) const {
    325       return edge_observers;
     325      return edge_notifier;
    326326    }
    327327
    328328    NodeNotifier& getNotifier(Node = INVALID) const {
    329       return node_observers;
     329      return node_notifier;
    330330    }
    331331
    332332    ~AlterableGraphExtender() {
    333       node_observers.clear();
    334       edge_observers.clear();
     333      node_notifier.clear();
     334      edge_notifier.clear();
    335335    }
    336336   
     
    363363  protected:
    364364
    365     mutable UndirEdgeNotifier undir_edge_observers;
     365    mutable UndirEdgeNotifier undir_edge_notifier;
    366366
    367367  public:
     
    369369    using Parent::getNotifier;
    370370    UndirEdgeNotifier& getNotifier(UndirEdge) const {
    371       return undir_edge_observers;
     371      return undir_edge_notifier;
    372372    }
    373373
    374374    ~AlterableUndirGraphExtender() {
    375       undir_edge_observers.clear();
     375      undir_edge_notifier.clear();
    376376    }
    377377  };
  • src/lemon/list_graph.h

    r1039 r1040  
    432432        g=&_g;
    433433        AlterationNotifier<Node>::ObserverBase::
    434           attach(g->node_observers);
     434          attach(g->getNotifier(Node()));
    435435        AlterationNotifier<Edge>::ObserverBase::
    436           attach(g->edge_observers);
     436          attach(g->getNotifier(Edge()));
    437437      }
    438438           
  • src/lemon/smart_graph.h

    r1039 r1040  
    268268    {
    269269      while(s.edge_num>edges.size()) {
    270         edge_observers.erase(Edge(edges.size()-1));
     270        Parent::getNotifier(Edge()).erase(Edge(edges.size()-1));
    271271        nodes[edges.back().target].first_in=edges.back().next_in;
    272272        nodes[edges.back().source].first_out=edges.back().next_out;
     
    275275      //nodes.resize(s.nodes_num);
    276276      while(s.node_num>nodes.size()) {
    277         node_observers.erase(Node(nodes.size()-1));
     277        Parent::getNotifier(Node()).erase(Node(nodes.size()-1));
    278278        nodes.pop_back();
    279279      }
Note: See TracChangeset for help on using the changeset viewer.