# HG changeset patch # User deba # Date 1100168965 0 # Node ID 93dd862335af4a6bc7536e998fdbedc3ea95efc9 # Parent 2e34b796d5325e9e48505aece26c4f836a4d9bf4 mappable_graph_extender.h erased the map extenders are moved to the map implementation headers diff -r 2e34b796d532 -r 93dd862335af src/lemon/mappable_graph_extender.h --- a/src/lemon/mappable_graph_extender.h Thu Nov 11 10:17:20 2004 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,97 +0,0 @@ -// -*- c++ -*- - -#ifndef LEMON_MAPPABLE_GRAPH_EXTENDER_H -#define LEMON_MAPPABLE_GRAPH_EXTENDER_H - -namespace lemon { - - template class DynMap> - class MappableGraphExtender : public Base { - public: - - typedef MappableGraphExtender Graph; - typedef Base Parent; - - typedef typename Parent::Node Node; - typedef typename Parent::NodeIt NodeIt; - typedef typename Parent::NodeObserverRegistry NodeObserverRegistry; - - typedef typename Parent::Edge Edge; - typedef typename Parent::EdgeIt EdgeIt; - typedef typename Parent::EdgeObserverRegistry EdgeObserverRegistry; - - public: - - class NodeIdMap { - private: - const Graph* graph; - - public: - NodeIdMap(const Graph& g) : graph(&g) {} - - int operator[](const Node& node) { return graph->id(node); } - - int maxId() const {return graph->maxNodeId(); } - - }; - - // template - // friend class DynMap; - - class EdgeIdMap { - private: - const Graph* graph; - - public: - EdgeIdMap(const Graph& g) : graph(&g) {} - - int operator[](const Edge& edge) const { return graph->id(edge); } - - int maxId() const {return graph->maxEdgeId(); } - - }; - - // template - // friend class DynMap; - - public: - - template - class NodeMap - : public DynMap { - public: - typedef DynMap Parent; - - NodeMap(const Graph& g) - : Parent(g, g.Graph::Parent::getNodeObserverRegistry()) {} - NodeMap(const Graph& g, const Value& v) - : Parent(g, g.Graph::Parent::getNodeObserverRegistry(), v) {} - - }; - - template - class EdgeMap - : public DynMap { - public: - typedef DynMap Parent; - - EdgeMap(const Graph& g) - : Parent(g, g.Graph::Parent::getEdgeObserverRegistry()) {} - EdgeMap(const Graph& g, const Value& v) - : Parent(g, g.Graph::Parent::getEdgeObserverRegistry(), v) {} - - }; - - - }; - -} - -#endif -