00001
00002
00003 #ifndef LEMON_CLEARABLE_GRAPH_EXTENDER_H
00004 #define LEMON_CLEARABLE_GRAPH_EXTENDER_H
00005
00006 #include <lemon/invalid.h>
00007
00008
00009 namespace lemon {
00010
00011 template <typename _Base>
00012 class ClearableGraphExtender : public _Base {
00013 public:
00014
00015 typedef ClearableGraphExtender Graph;
00016 typedef _Base Parent;
00017 typedef typename Parent::Node Node;
00018 typedef typename Parent::Edge Edge;
00019
00020 void clear() {
00021 Parent::getNotifier(Node()).clear();
00022 Parent::getNotifier(Edge()).clear();
00023 Parent::clear();
00024 }
00025
00026 };
00027
00028 template <typename _Base>
00029 class ClearableUndirGraphExtender : public _Base {
00030 public:
00031
00032 typedef ClearableUndirGraphExtender Graph;
00033 typedef _Base Parent;
00034 typedef typename Parent::Node Node;
00035 typedef typename Parent::UndirEdge UndirEdge;
00036 typedef typename Parent::Edge Edge;
00037
00038 void clear() {
00039 Parent::getNotifier(Node()).clear();
00040 Parent::getNotifier(UndirEdge()).clear();
00041 Parent::getNotifier(Edge()).clear();
00042 Parent::clear();
00043 }
00044
00045 };
00046
00047 }
00048
00049 #endif