klao@946: // -*- c++ -*- klao@946: klao@946: #ifndef LEMON_CLEARABLE_GRAPH_EXTENDER_H klao@946: #define LEMON_CLEARABLE_GRAPH_EXTENDER_H klao@946: klao@946: #include klao@946: klao@946: klao@946: namespace lemon { klao@946: klao@946: template klao@946: class ClearableGraphExtender : public _Base { klao@946: public: klao@946: klao@946: typedef ClearableGraphExtender Graph; klao@946: typedef _Base Parent; deba@980: typedef typename Parent::Node Node; deba@980: typedef typename Parent::Edge Edge; klao@946: klao@946: void clear() { deba@1039: Parent::getNotifier(Node()).clear(); deba@1039: Parent::getNotifier(Edge()).clear(); klao@946: Parent::clear(); klao@946: } klao@946: klao@946: }; klao@946: klao@1022: template deba@1842: class ClearableEdgeSetExtender : public _Base { deba@1842: public: deba@1842: deba@1842: typedef ClearableEdgeSetExtender Graph; deba@1842: typedef _Base Parent; deba@1842: typedef typename Parent::Node Node; deba@1842: typedef typename Parent::Edge Edge; deba@1842: deba@1842: void clear() { deba@1842: Parent::getNotifier(Edge()).clear(); deba@1842: Parent::clear(); deba@1842: } deba@1842: deba@1842: }; deba@1842: deba@1842: template klao@1909: class ClearableUGraphExtender : public _Base { klao@1022: public: klao@1022: klao@1909: typedef ClearableUGraphExtender Graph; klao@1022: typedef _Base Parent; klao@1022: typedef typename Parent::Node Node; klao@1909: typedef typename Parent::UEdge UEdge; klao@1022: typedef typename Parent::Edge Edge; klao@1022: klao@1022: void clear() { deba@1039: Parent::getNotifier(Node()).clear(); klao@1909: Parent::getNotifier(UEdge()).clear(); deba@1039: Parent::getNotifier(Edge()).clear(); klao@1022: Parent::clear(); klao@1022: } deba@1842: }; deba@1842: deba@1842: template klao@1909: class ClearableUEdgeSetExtender : public _Base { deba@1842: public: deba@1842: klao@1909: typedef ClearableUEdgeSetExtender Graph; deba@1842: typedef _Base Parent; deba@1842: typedef typename Parent::Node Node; klao@1909: typedef typename Parent::UEdge UEdge; deba@1842: typedef typename Parent::Edge Edge; deba@1842: deba@1842: void clear() { klao@1909: Parent::getNotifier(UEdge()).clear(); deba@1842: Parent::getNotifier(Edge()).clear(); deba@1842: Parent::clear(); deba@1842: } klao@1022: klao@1022: }; klao@1022: deba@1820: deba@1820: template deba@1910: class ClearableBpUGraphExtender : public _Base { deba@1820: public: deba@1820: deba@1820: typedef _Base Parent; deba@1910: typedef ClearableBpUGraphExtender Graph; deba@1820: deba@1820: typedef typename Parent::Node Node; deba@1910: typedef typename Parent::BNode BNode; deba@1910: typedef typename Parent::ANode ANode; deba@1820: typedef typename Parent::Edge Edge; klao@1909: typedef typename Parent::UEdge UEdge; deba@1820: deba@1820: void clear() { deba@1820: Parent::getNotifier(Edge()).clear(); klao@1909: Parent::getNotifier(UEdge()).clear(); deba@1820: Parent::getNotifier(Node()).clear(); deba@1910: Parent::getNotifier(BNode()).clear(); deba@1910: Parent::getNotifier(ANode()).clear(); deba@1820: Parent::clear(); deba@1820: } deba@1820: deba@1820: }; deba@1820: klao@946: } klao@946: klao@946: #endif