Changeset 1040:372f08e8f403 in lemon-0.x
- Timestamp:
- 12/16/04 13:44:49 (20 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@1430
- Location:
- src/lemon
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
src/lemon/alteration_notifier.h
r1039 r1040 193 193 194 194 /// Assign operator for the AlterationNotifier. 195 /// It makes the registryonly empty because the copiable196 /// 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. 197 197 AlterationNotifier& operator=(const AlterationNotifier&) { 198 198 typename Container::iterator it; … … 316 316 protected: 317 317 318 mutable EdgeNotifier edge_ observers;319 320 mutable NodeNotifier node_ observers;318 mutable EdgeNotifier edge_notifier; 319 320 mutable NodeNotifier node_notifier; 321 321 322 322 public: 323 323 324 324 EdgeNotifier& getNotifier(Edge = INVALID) const { 325 return edge_ observers;325 return edge_notifier; 326 326 } 327 327 328 328 NodeNotifier& getNotifier(Node = INVALID) const { 329 return node_ observers;329 return node_notifier; 330 330 } 331 331 332 332 ~AlterableGraphExtender() { 333 node_ observers.clear();334 edge_ observers.clear();333 node_notifier.clear(); 334 edge_notifier.clear(); 335 335 } 336 336 … … 363 363 protected: 364 364 365 mutable UndirEdgeNotifier undir_edge_ observers;365 mutable UndirEdgeNotifier undir_edge_notifier; 366 366 367 367 public: … … 369 369 using Parent::getNotifier; 370 370 UndirEdgeNotifier& getNotifier(UndirEdge) const { 371 return undir_edge_ observers;371 return undir_edge_notifier; 372 372 } 373 373 374 374 ~AlterableUndirGraphExtender() { 375 undir_edge_ observers.clear();375 undir_edge_notifier.clear(); 376 376 } 377 377 }; -
src/lemon/list_graph.h
r1039 r1040 432 432 g=&_g; 433 433 AlterationNotifier<Node>::ObserverBase:: 434 attach(g-> node_observers);434 attach(g->getNotifier(Node())); 435 435 AlterationNotifier<Edge>::ObserverBase:: 436 attach(g-> edge_observers);436 attach(g->getNotifier(Edge())); 437 437 } 438 438 -
src/lemon/smart_graph.h
r1039 r1040 268 268 { 269 269 while(s.edge_num>edges.size()) { 270 edge_observers.erase(Edge(edges.size()-1));270 Parent::getNotifier(Edge()).erase(Edge(edges.size()-1)); 271 271 nodes[edges.back().target].first_in=edges.back().next_in; 272 272 nodes[edges.back().source].first_out=edges.back().next_out; … … 275 275 //nodes.resize(s.nodes_num); 276 276 while(s.node_num>nodes.size()) { 277 node_observers.erase(Node(nodes.size()-1));277 Parent::getNotifier(Node()).erase(Node(nodes.size()-1)); 278 278 nodes.pop_back(); 279 279 }
Note: See TracChangeset
for help on using the changeset viewer.