COIN-OR::LEMON - Graph Library

source: lemon-0.x/src/lemon/clearable_graph_extender.h @ 980:0f1044b7a3af

Last change on this file since 980:0f1044b7a3af was 980:0f1044b7a3af, checked in by Balazs Dezso, 15 years ago

maxNodeId() and maxEdgeId() changed to maxId(Node) and maxId(Edge)
getNodeObserverRegistry() and getEdgeObserverRegistry() changed to
getObserverRegistry(Node) and getObserverRegistry(Edge)

IdMappableGraphExtender? erased

File size: 551 bytes
Line 
1// -*- c++ -*-
2
3#ifndef LEMON_CLEARABLE_GRAPH_EXTENDER_H
4#define LEMON_CLEARABLE_GRAPH_EXTENDER_H
5
6#include <lemon/invalid.h>
7
8
9namespace lemon {
10
11  template <typename _Base>
12  class ClearableGraphExtender : public _Base {
13  public:
14
15    typedef ClearableGraphExtender Graph;
16    typedef _Base Parent;
17    typedef typename Parent::Node Node;
18    typedef typename Parent::Edge Edge;
19
20    void clear() {
21      Parent::getObserverRegistry(Node()).clear();
22      Parent::getObserverRegistry(Edge()).clear();
23      Parent::clear();
24    }
25
26  };
27
28}
29
30#endif
Note: See TracBrowser for help on using the repository browser.