deba@262: #ifndef EDGE_MAP_BASE_H
deba@262: #define EDGE_MAP_BASE_H
deba@262: 
deba@262: template <class G, class K>
deba@262: class EdgeMapBase {
deba@262: public:
deba@262: 	typedef G Graph;
deba@262: 	typedef K KeyType;
deba@262: 	
deba@262: 
deba@262: 	MapBase() : graph(0) {}
deba@262: 	MapBase(Graph& g) : graph(&g) {graph.edge_maps.add(*this);}
deba@262: 
deba@262: 	virtual ~MapBase() {graph.edge_maps.erase(*this);}	
deba@262: 
deba@262: protected:
deba@262: 	
deba@262: 	Graph* graph;
deba@262: 
deba@262: 	int graph_index;
deba@262: 	
deba@262: 	
deba@262: 	virtual void add(const KeyType&) = 0;
deba@262: 	virtual void erase(const KeyType&) = 0;
deba@262: 
deba@262: 	friend class Graph;
deba@262: };
deba@262: 
deba@262: #endif