COIN-OR::LEMON - Graph Library

source: lemon-0.x/src/work/deba/node_map_base.h @ 294:f0ff6981d4fd

Last change on this file since 294:f0ff6981d4fd was 262:60de0f16a4a1, checked in by Balazs Dezso, 17 years ago
File size: 452 bytes
Line 
1#ifndef NODE_MAP_BASE_H
2#define NODE_MAP_BASE_H
3
4template <class G, class K>
5class NodeMapBase {
6public:
7        typedef G Graph;
8
9        typedef K KeyType;
10       
11
12        MapBase() : graph(0) {}
13        MapBase(Graph& g) : graph(&g) {graph.node_maps.add(*this);}
14
15        virtual ~MapBase() {graph.node_maps.erase(*this);}     
16
17protected:
18       
19        Graph* graph;
20
21        int graph_index;
22       
23       
24        virtual void add(const KeyType&) = 0;
25        virtual void erase(const KeyType&) = 0;
26
27        friend class Graph;
28};
29
30#endif
Note: See TracBrowser for help on using the repository browser.