author | deba |
Mon, 21 Nov 2005 18:12:11 +0000 | |
changeset 1824 | 3a15b39a7c78 |
parent 1435 | 8e85e6bbefdf |
child 1842 | 8abf74160dc4 |
permissions | -rw-r--r-- |
klao@946 | 1 |
// -*- c++ -*- |
klao@946 | 2 |
|
klao@946 | 3 |
#ifndef LEMON_CLEARABLE_GRAPH_EXTENDER_H |
klao@946 | 4 |
#define LEMON_CLEARABLE_GRAPH_EXTENDER_H |
klao@946 | 5 |
|
klao@946 | 6 |
#include <lemon/invalid.h> |
klao@946 | 7 |
|
klao@946 | 8 |
|
klao@946 | 9 |
namespace lemon { |
klao@946 | 10 |
|
klao@946 | 11 |
template <typename _Base> |
klao@946 | 12 |
class ClearableGraphExtender : public _Base { |
klao@946 | 13 |
public: |
klao@946 | 14 |
|
klao@946 | 15 |
typedef ClearableGraphExtender Graph; |
klao@946 | 16 |
typedef _Base Parent; |
deba@980 | 17 |
typedef typename Parent::Node Node; |
deba@980 | 18 |
typedef typename Parent::Edge Edge; |
klao@946 | 19 |
|
klao@946 | 20 |
void clear() { |
deba@1039 | 21 |
Parent::getNotifier(Node()).clear(); |
deba@1039 | 22 |
Parent::getNotifier(Edge()).clear(); |
klao@946 | 23 |
Parent::clear(); |
klao@946 | 24 |
} |
klao@946 | 25 |
|
klao@946 | 26 |
}; |
klao@946 | 27 |
|
klao@1022 | 28 |
template <typename _Base> |
klao@1022 | 29 |
class ClearableUndirGraphExtender : public _Base { |
klao@1022 | 30 |
public: |
klao@1022 | 31 |
|
klao@1022 | 32 |
typedef ClearableUndirGraphExtender Graph; |
klao@1022 | 33 |
typedef _Base Parent; |
klao@1022 | 34 |
typedef typename Parent::Node Node; |
klao@1022 | 35 |
typedef typename Parent::UndirEdge UndirEdge; |
klao@1022 | 36 |
typedef typename Parent::Edge Edge; |
klao@1022 | 37 |
|
klao@1022 | 38 |
void clear() { |
deba@1039 | 39 |
Parent::getNotifier(Node()).clear(); |
deba@1039 | 40 |
Parent::getNotifier(UndirEdge()).clear(); |
deba@1039 | 41 |
Parent::getNotifier(Edge()).clear(); |
klao@1022 | 42 |
Parent::clear(); |
klao@1022 | 43 |
} |
klao@1022 | 44 |
|
klao@1022 | 45 |
}; |
klao@1022 | 46 |
|
deba@1820 | 47 |
|
deba@1820 | 48 |
template <typename _Base> |
deba@1820 | 49 |
class ClearableUndirBipartiteGraphExtender : public _Base { |
deba@1820 | 50 |
public: |
deba@1820 | 51 |
|
deba@1820 | 52 |
typedef _Base Parent; |
deba@1820 | 53 |
typedef ClearableUndirBipartiteGraphExtender Graph; |
deba@1820 | 54 |
|
deba@1820 | 55 |
typedef typename Parent::Node Node; |
deba@1820 | 56 |
typedef typename Parent::LowerNode LowerNode; |
deba@1820 | 57 |
typedef typename Parent::UpperNode UpperNode; |
deba@1820 | 58 |
typedef typename Parent::Edge Edge; |
deba@1820 | 59 |
typedef typename Parent::UndirEdge UndirEdge; |
deba@1820 | 60 |
|
deba@1820 | 61 |
void clear() { |
deba@1820 | 62 |
Parent::getNotifier(Edge()).clear(); |
deba@1820 | 63 |
Parent::getNotifier(UndirEdge()).clear(); |
deba@1820 | 64 |
Parent::getNotifier(Node()).clear(); |
deba@1820 | 65 |
Parent::getNotifier(LowerNode()).clear(); |
deba@1820 | 66 |
Parent::getNotifier(UpperNode()).clear(); |
deba@1820 | 67 |
Parent::clear(); |
deba@1820 | 68 |
} |
deba@1820 | 69 |
|
deba@1820 | 70 |
}; |
deba@1820 | 71 |
|
klao@946 | 72 |
} |
klao@946 | 73 |
|
klao@946 | 74 |
#endif |