79 |
79 |
80 mutable EdgeNotifier edge_notifier; |
80 mutable EdgeNotifier edge_notifier; |
81 |
81 |
82 public: |
82 public: |
83 |
83 |
84 using Parent::getNotifier; |
84 using Parent::notifier; |
85 |
85 |
86 /// \brief Gives back the edge alteration notifier. |
86 /// \brief Gives back the edge alteration notifier. |
87 /// |
87 /// |
88 /// Gives back the edge alteration notifier. |
88 /// Gives back the edge alteration notifier. |
89 EdgeNotifier& getNotifier(Edge) const { |
89 EdgeNotifier& notifier(Edge) const { |
90 return edge_notifier; |
90 return edge_notifier; |
91 } |
91 } |
92 |
92 |
93 // Iterable extensions |
93 // Iterable extensions |
94 |
94 |
244 |
244 |
245 // Alteration extension |
245 // Alteration extension |
246 |
246 |
247 Edge addEdge(const Node& from, const Node& to) { |
247 Edge addEdge(const Node& from, const Node& to) { |
248 Edge edge = Parent::addEdge(from, to); |
248 Edge edge = Parent::addEdge(from, to); |
249 getNotifier(Edge()).add(edge); |
249 notifier(Edge()).add(edge); |
250 return edge; |
250 return edge; |
251 } |
251 } |
252 |
252 |
253 void clear() { |
253 void clear() { |
254 getNotifier(Edge()).clear(); |
254 notifier(Edge()).clear(); |
255 Parent::clear(); |
255 Parent::clear(); |
256 } |
256 } |
257 |
257 |
258 void erase(const Edge& edge) { |
258 void erase(const Edge& edge) { |
259 getNotifier(Edge()).erase(edge); |
259 notifier(Edge()).erase(edge); |
260 Parent::erase(edge); |
260 Parent::erase(edge); |
261 } |
261 } |
262 |
262 |
263 EdgeSetExtender() { |
263 EdgeSetExtender() { |
264 edge_notifier.setContainer(*this); |
264 edge_notifier.setContainer(*this); |
338 mutable EdgeNotifier edge_notifier; |
338 mutable EdgeNotifier edge_notifier; |
339 mutable UEdgeNotifier uedge_notifier; |
339 mutable UEdgeNotifier uedge_notifier; |
340 |
340 |
341 public: |
341 public: |
342 |
342 |
343 using Parent::getNotifier; |
343 using Parent::notifier; |
344 |
344 |
345 EdgeNotifier& getNotifier(Edge) const { |
345 EdgeNotifier& notifier(Edge) const { |
346 return edge_notifier; |
346 return edge_notifier; |
347 } |
347 } |
348 |
348 |
349 UEdgeNotifier& getNotifier(UEdge) const { |
349 UEdgeNotifier& notifier(UEdge) const { |
350 return uedge_notifier; |
350 return uedge_notifier; |
351 } |
351 } |
352 |
352 |
353 |
353 |
354 class NodeIt : public Node { |
354 class NodeIt : public Node { |
587 |
587 |
588 // Alteration extension |
588 // Alteration extension |
589 |
589 |
590 UEdge addEdge(const Node& from, const Node& to) { |
590 UEdge addEdge(const Node& from, const Node& to) { |
591 UEdge uedge = Parent::addEdge(from, to); |
591 UEdge uedge = Parent::addEdge(from, to); |
592 getNotifier(UEdge()).add(uedge); |
592 notifier(UEdge()).add(uedge); |
593 getNotifier(Edge()).add(Parent::direct(uedge, true)); |
593 notifier(Edge()).add(Parent::direct(uedge, true)); |
594 getNotifier(Edge()).add(Parent::direct(uedge, false)); |
594 notifier(Edge()).add(Parent::direct(uedge, false)); |
595 return uedge; |
595 return uedge; |
596 } |
596 } |
597 |
597 |
598 void clear() { |
598 void clear() { |
599 getNotifier(Edge()).clear(); |
599 notifier(Edge()).clear(); |
600 getNotifier(UEdge()).clear(); |
600 notifier(UEdge()).clear(); |
601 Parent::clear(); |
601 Parent::clear(); |
602 } |
602 } |
603 |
603 |
604 void erase(const UEdge& uedge) { |
604 void erase(const UEdge& uedge) { |
605 getNotifier(Edge()).erase(Parent::direct(uedge, true)); |
605 notifier(Edge()).erase(Parent::direct(uedge, true)); |
606 getNotifier(Edge()).erase(Parent::direct(uedge, false)); |
606 notifier(Edge()).erase(Parent::direct(uedge, false)); |
607 getNotifier(UEdge()).erase(uedge); |
607 notifier(UEdge()).erase(uedge); |
608 Parent::erase(uedge); |
608 Parent::erase(uedge); |
609 } |
609 } |
610 |
610 |
611 |
611 |
612 UEdgeSetExtender() { |
612 UEdgeSetExtender() { |