/* -*- C++ -*- * * This file is a part of LEMON, a generic C++ optimization library * * Copyright (C) 2003-2006 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport * (Egervary Research Group on Combinatorial Optimization, EGRES). * * Permission to use, modify and distribute this software is granted * provided that this copyright notice appears in all copies. For * precise terms see the accompanying LICENSE file. * * This software is provided "AS IS" with no warranty of any kind, * express or implied, and with no claim as to its suitability for any * purpose. * */ #ifndef LEMON_CLEARABLE_GRAPH_EXTENDER_H #define LEMON_CLEARABLE_GRAPH_EXTENDER_H #include namespace lemon { template class ClearableGraphExtender : public _Base { public: typedef ClearableGraphExtender Graph; typedef _Base Parent; typedef typename Parent::Node Node; typedef typename Parent::Edge Edge; void clear() { Parent::getNotifier(Node()).clear(); Parent::getNotifier(Edge()).clear(); Parent::clear(); } }; template class ClearableEdgeSetExtender : public _Base { public: typedef ClearableEdgeSetExtender Graph; typedef _Base Parent; typedef typename Parent::Node Node; typedef typename Parent::Edge Edge; void clear() { Parent::getNotifier(Edge()).clear(); Parent::clear(); } }; template class ClearableUGraphExtender : public _Base { public: typedef ClearableUGraphExtender Graph; typedef _Base Parent; typedef typename Parent::Node Node; typedef typename Parent::UEdge UEdge; typedef typename Parent::Edge Edge; void clear() { Parent::getNotifier(Node()).clear(); Parent::getNotifier(UEdge()).clear(); Parent::getNotifier(Edge()).clear(); Parent::clear(); } }; template class ClearableUEdgeSetExtender : public _Base { public: typedef ClearableUEdgeSetExtender Graph; typedef _Base Parent; typedef typename Parent::Node Node; typedef typename Parent::UEdge UEdge; typedef typename Parent::Edge Edge; void clear() { Parent::getNotifier(UEdge()).clear(); Parent::getNotifier(Edge()).clear(); Parent::clear(); } }; template class ClearableBpUGraphExtender : public _Base { public: typedef _Base Parent; typedef ClearableBpUGraphExtender Graph; typedef typename Parent::Node Node; typedef typename Parent::BNode BNode; typedef typename Parent::ANode ANode; typedef typename Parent::Edge Edge; typedef typename Parent::UEdge UEdge; void clear() { Parent::getNotifier(Edge()).clear(); Parent::getNotifier(UEdge()).clear(); Parent::getNotifier(Node()).clear(); Parent::getNotifier(BNode()).clear(); Parent::getNotifier(ANode()).clear(); Parent::clear(); } }; } #endif