00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019 #ifndef LEMON_CLEARABLE_GRAPH_EXTENDER_H
00020 #define LEMON_CLEARABLE_GRAPH_EXTENDER_H
00021
00022 #include <lemon/invalid.h>
00023
00024
00025 namespace lemon {
00026
00027 template <typename _Base>
00028 class ClearableGraphExtender : public _Base {
00029 public:
00030
00031 typedef ClearableGraphExtender Graph;
00032 typedef _Base Parent;
00033 typedef typename Parent::Node Node;
00034 typedef typename Parent::Edge Edge;
00035
00036 void clear() {
00037 Parent::getNotifier(Node()).clear();
00038 Parent::getNotifier(Edge()).clear();
00039 Parent::clear();
00040 }
00041
00042 };
00043
00044 template <typename _Base>
00045 class ClearableEdgeSetExtender : public _Base {
00046 public:
00047
00048 typedef ClearableEdgeSetExtender Graph;
00049 typedef _Base Parent;
00050 typedef typename Parent::Node Node;
00051 typedef typename Parent::Edge Edge;
00052
00053 void clear() {
00054 Parent::getNotifier(Edge()).clear();
00055 Parent::clear();
00056 }
00057
00058 };
00059
00060 template <typename _Base>
00061 class ClearableUGraphExtender : public _Base {
00062 public:
00063
00064 typedef ClearableUGraphExtender Graph;
00065 typedef _Base Parent;
00066 typedef typename Parent::Node Node;
00067 typedef typename Parent::UEdge UEdge;
00068 typedef typename Parent::Edge Edge;
00069
00070 void clear() {
00071 Parent::getNotifier(Node()).clear();
00072 Parent::getNotifier(UEdge()).clear();
00073 Parent::getNotifier(Edge()).clear();
00074 Parent::clear();
00075 }
00076 };
00077
00078 template <typename _Base>
00079 class ClearableUEdgeSetExtender : public _Base {
00080 public:
00081
00082 typedef ClearableUEdgeSetExtender Graph;
00083 typedef _Base Parent;
00084 typedef typename Parent::Node Node;
00085 typedef typename Parent::UEdge UEdge;
00086 typedef typename Parent::Edge Edge;
00087
00088 void clear() {
00089 Parent::getNotifier(UEdge()).clear();
00090 Parent::getNotifier(Edge()).clear();
00091 Parent::clear();
00092 }
00093
00094 };
00095
00096
00097 template <typename _Base>
00098 class ClearableBpUGraphExtender : public _Base {
00099 public:
00100
00101 typedef _Base Parent;
00102 typedef ClearableBpUGraphExtender Graph;
00103
00104 typedef typename Parent::Node Node;
00105 typedef typename Parent::BNode BNode;
00106 typedef typename Parent::ANode ANode;
00107 typedef typename Parent::Edge Edge;
00108 typedef typename Parent::UEdge UEdge;
00109
00110 void clear() {
00111 Parent::getNotifier(Edge()).clear();
00112 Parent::getNotifier(UEdge()).clear();
00113 Parent::getNotifier(Node()).clear();
00114 Parent::getNotifier(BNode()).clear();
00115 Parent::getNotifier(ANode()).clear();
00116 Parent::clear();
00117 }
00118
00119 };
00120
00121 }
00122
00123 #endif