author | deba |
Sat, 03 Dec 2005 18:30:31 +0000 | |
changeset 1846 | 6b4e38acef1c |
parent 1820 | 22099ef840d7 |
child 1909 | 2d806130e700 |
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> |
deba@1842 | 29 |
class ClearableEdgeSetExtender : public _Base { |
deba@1842 | 30 |
public: |
deba@1842 | 31 |
|
deba@1842 | 32 |
typedef ClearableEdgeSetExtender Graph; |
deba@1842 | 33 |
typedef _Base Parent; |
deba@1842 | 34 |
typedef typename Parent::Node Node; |
deba@1842 | 35 |
typedef typename Parent::Edge Edge; |
deba@1842 | 36 |
|
deba@1842 | 37 |
void clear() { |
deba@1842 | 38 |
Parent::getNotifier(Edge()).clear(); |
deba@1842 | 39 |
Parent::clear(); |
deba@1842 | 40 |
} |
deba@1842 | 41 |
|
deba@1842 | 42 |
}; |
deba@1842 | 43 |
|
deba@1842 | 44 |
template <typename _Base> |
klao@1022 | 45 |
class ClearableUndirGraphExtender : public _Base { |
klao@1022 | 46 |
public: |
klao@1022 | 47 |
|
klao@1022 | 48 |
typedef ClearableUndirGraphExtender Graph; |
klao@1022 | 49 |
typedef _Base Parent; |
klao@1022 | 50 |
typedef typename Parent::Node Node; |
klao@1022 | 51 |
typedef typename Parent::UndirEdge UndirEdge; |
klao@1022 | 52 |
typedef typename Parent::Edge Edge; |
klao@1022 | 53 |
|
klao@1022 | 54 |
void clear() { |
deba@1039 | 55 |
Parent::getNotifier(Node()).clear(); |
deba@1039 | 56 |
Parent::getNotifier(UndirEdge()).clear(); |
deba@1039 | 57 |
Parent::getNotifier(Edge()).clear(); |
klao@1022 | 58 |
Parent::clear(); |
klao@1022 | 59 |
} |
deba@1842 | 60 |
}; |
deba@1842 | 61 |
|
deba@1842 | 62 |
template <typename _Base> |
deba@1842 | 63 |
class ClearableUndirEdgeSetExtender : public _Base { |
deba@1842 | 64 |
public: |
deba@1842 | 65 |
|
deba@1842 | 66 |
typedef ClearableUndirEdgeSetExtender Graph; |
deba@1842 | 67 |
typedef _Base Parent; |
deba@1842 | 68 |
typedef typename Parent::Node Node; |
deba@1842 | 69 |
typedef typename Parent::UndirEdge UndirEdge; |
deba@1842 | 70 |
typedef typename Parent::Edge Edge; |
deba@1842 | 71 |
|
deba@1842 | 72 |
void clear() { |
deba@1842 | 73 |
Parent::getNotifier(UndirEdge()).clear(); |
deba@1842 | 74 |
Parent::getNotifier(Edge()).clear(); |
deba@1842 | 75 |
Parent::clear(); |
deba@1842 | 76 |
} |
klao@1022 | 77 |
|
klao@1022 | 78 |
}; |
klao@1022 | 79 |
|
deba@1820 | 80 |
|
deba@1820 | 81 |
template <typename _Base> |
deba@1820 | 82 |
class ClearableUndirBipartiteGraphExtender : public _Base { |
deba@1820 | 83 |
public: |
deba@1820 | 84 |
|
deba@1820 | 85 |
typedef _Base Parent; |
deba@1820 | 86 |
typedef ClearableUndirBipartiteGraphExtender Graph; |
deba@1820 | 87 |
|
deba@1820 | 88 |
typedef typename Parent::Node Node; |
deba@1820 | 89 |
typedef typename Parent::LowerNode LowerNode; |
deba@1820 | 90 |
typedef typename Parent::UpperNode UpperNode; |
deba@1820 | 91 |
typedef typename Parent::Edge Edge; |
deba@1820 | 92 |
typedef typename Parent::UndirEdge UndirEdge; |
deba@1820 | 93 |
|
deba@1820 | 94 |
void clear() { |
deba@1820 | 95 |
Parent::getNotifier(Edge()).clear(); |
deba@1820 | 96 |
Parent::getNotifier(UndirEdge()).clear(); |
deba@1820 | 97 |
Parent::getNotifier(Node()).clear(); |
deba@1820 | 98 |
Parent::getNotifier(LowerNode()).clear(); |
deba@1820 | 99 |
Parent::getNotifier(UpperNode()).clear(); |
deba@1820 | 100 |
Parent::clear(); |
deba@1820 | 101 |
} |
deba@1820 | 102 |
|
deba@1820 | 103 |
}; |
deba@1820 | 104 |
|
klao@946 | 105 |
} |
klao@946 | 106 |
|
klao@946 | 107 |
#endif |