author | marci |
Wed, 17 Nov 2004 19:56:46 +0000 | |
changeset 1004 | b94037830dc8 |
parent 946 | c94ef40a22ce |
child 1022 | 567f392d1d2e |
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@980 | 21 |
Parent::getObserverRegistry(Node()).clear(); |
deba@980 | 22 |
Parent::getObserverRegistry(Edge()).clear(); |
klao@946 | 23 |
Parent::clear(); |
klao@946 | 24 |
} |
klao@946 | 25 |
|
klao@946 | 26 |
}; |
klao@946 | 27 |
|
klao@946 | 28 |
} |
klao@946 | 29 |
|
klao@946 | 30 |
#endif |