lemon/bits/alteration_notifier.h
changeset 1827 dc660ed95b31
parent 1729 06f939455cb1
child 1832 d0c28d9c9141
equal deleted inserted replaced
5:055a68c63d6d 6:e06d94ff1dae
   437 
   437 
   438     ~AlterableUndirGraphExtender() {
   438     ~AlterableUndirGraphExtender() {
   439       undir_edge_notifier.clear();
   439       undir_edge_notifier.clear();
   440     }
   440     }
   441   };
   441   };
       
   442 
       
   443 
       
   444   template <typename _Base>
       
   445   class AlterableUndirBipartiteGraphExtender : public _Base {
       
   446   public:
       
   447 
       
   448     typedef _Base Parent;
       
   449     typedef AlterableUndirBipartiteGraphExtender Graph;
       
   450   
       
   451     typedef typename Parent::Node Node;
       
   452     typedef typename Parent::LowerNode LowerNode;
       
   453     typedef typename Parent::UpperNode UpperNode;
       
   454     typedef typename Parent::Edge Edge;
       
   455     typedef typename Parent::UndirEdge UndirEdge;
       
   456   
       
   457   
       
   458     typedef AlterationNotifier<Node> NodeNotifier;
       
   459     typedef AlterationNotifier<LowerNode> LowerNodeNotifier;
       
   460     typedef AlterationNotifier<UpperNode> UpperNodeNotifier;
       
   461     typedef AlterationNotifier<Edge> EdgeNotifier;
       
   462     typedef AlterationNotifier<UndirEdge> UndirEdgeNotifier;
       
   463 
       
   464   protected:
       
   465 
       
   466     mutable NodeNotifier nodeNotifier;
       
   467     mutable LowerNodeNotifier lowerNodeNotifier;
       
   468     mutable UpperNodeNotifier upperNodeNotifier;
       
   469     mutable EdgeNotifier edgeNotifier;
       
   470     mutable UndirEdgeNotifier undirEdgeNotifier;
       
   471 
       
   472   public:
       
   473 
       
   474     NodeNotifier& getNotifier(Node) const {
       
   475       return nodeNotifier;
       
   476     }
       
   477 
       
   478     LowerNodeNotifier& getNotifier(LowerNode) const {
       
   479       return lowerNodeNotifier;
       
   480     }
       
   481 
       
   482     UpperNodeNotifier& getNotifier(UpperNode) const {
       
   483       return upperNodeNotifier;
       
   484     }
       
   485 
       
   486     EdgeNotifier& getNotifier(Edge) const {
       
   487       return edgeNotifier;
       
   488     }
       
   489 
       
   490     UndirEdgeNotifier& getNotifier(UndirEdge) const {
       
   491       return undirEdgeNotifier;
       
   492     }
       
   493 
       
   494     ~AlterableUndirBipartiteGraphExtender() {
       
   495       nodeNotifier.clear();
       
   496       lowerNodeNotifier.clear();
       
   497       upperNodeNotifier.clear();
       
   498       edgeNotifier.clear();
       
   499       undirEdgeNotifier.clear();
       
   500     }
       
   501 
       
   502   };
   442   
   503   
   443 /// @}
   504 /// @}
   444   
   505   
   445 
   506 
   446 }
   507 }