diff -r f2d6d3446adf -r 4137ef9aacc6 lemon/edge_set.h --- a/lemon/edge_set.h Fri Apr 24 10:15:33 2009 +0200 +++ b/lemon/edge_set.h Fri Apr 24 11:54:48 2009 +0200 @@ -33,7 +33,6 @@ class ListArcSetBase { public: - typedef GR Graph; typedef typename GR::Node Node; typedef typename GR::NodeIt NodeIt; @@ -208,10 +207,10 @@ template class NodeMap : public GR::template NodeMap { + typedef typename GR::template NodeMap Parent; + public: - typedef typename GR::template NodeMap Parent; - explicit NodeMap(const ListArcSetBase& arcset) : Parent(*arcset._graph) {} @@ -259,17 +258,13 @@ /// "Digraph" concept. template class ListArcSet : public ArcSetExtender > { + typedef ArcSetExtender > Parent; public: - typedef ArcSetExtender > Parent; - typedef typename Parent::Node Node; typedef typename Parent::Arc Arc; - typedef GR Graph; - - typedef typename Parent::NodesImplBase NodesImplBase; void eraseNode(const Node& node) { @@ -292,9 +287,9 @@ } class NodesImpl : public NodesImplBase { - public: typedef NodesImplBase Parent; + public: NodesImpl(const GR& graph, ListArcSet& arcset) : Parent(graph), _arcset(arcset) {} @@ -354,7 +349,6 @@ class ListEdgeSetBase { public: - typedef GR Graph; typedef typename GR::Node Node; typedef typename GR::NodeIt NodeIt; @@ -637,10 +631,10 @@ template class NodeMap : public GR::template NodeMap { + typedef typename GR::template NodeMap Parent; + public: - typedef typename GR::template NodeMap Parent; - explicit NodeMap(const ListEdgeSetBase& arcset) : Parent(*arcset._graph) {} @@ -688,18 +682,14 @@ /// concept. template class ListEdgeSet : public EdgeSetExtender > { + typedef EdgeSetExtender > Parent; public: - typedef EdgeSetExtender > Parent; - typedef typename Parent::Node Node; typedef typename Parent::Arc Arc; typedef typename Parent::Edge Edge; - typedef GR Graph; - - typedef typename Parent::NodesImplBase NodesImplBase; void eraseNode(const Node& node) { @@ -717,9 +707,9 @@ } class NodesImpl : public NodesImplBase { - public: typedef NodesImplBase Parent; + public: NodesImpl(const GR& graph, ListEdgeSet& arcset) : Parent(graph), _arcset(arcset) {} @@ -779,9 +769,8 @@ class SmartArcSetBase { public: - typedef GR Graph; - typedef typename Graph::Node Node; - typedef typename Graph::NodeIt NodeIt; + typedef typename GR::Node Node; + typedef typename GR::NodeIt NodeIt; protected: @@ -900,10 +889,10 @@ template class NodeMap : public GR::template NodeMap { + typedef typename GR::template NodeMap Parent; + public: - typedef typename GR::template NodeMap Parent; - explicit NodeMap(const SmartArcSetBase& arcset) : Parent(*arcset._graph) { } @@ -956,16 +945,13 @@ /// "Digraph" concept. template class SmartArcSet : public ArcSetExtender > { + typedef ArcSetExtender > Parent; public: - typedef ArcSetExtender > Parent; - typedef typename Parent::Node Node; typedef typename Parent::Arc Arc; - typedef GR Graph; - protected: typedef typename Parent::NodesImplBase NodesImplBase; @@ -983,9 +969,9 @@ } class NodesImpl : public NodesImplBase { - public: typedef NodesImplBase Parent; + public: NodesImpl(const GR& graph, SmartArcSet& arcset) : Parent(graph), _arcset(arcset) {} @@ -1062,7 +1048,6 @@ class SmartEdgeSetBase { public: - typedef GR Graph; typedef typename GR::Node Node; typedef typename GR::NodeIt NodeIt; @@ -1249,10 +1234,10 @@ template class NodeMap : public GR::template NodeMap { + typedef typename GR::template NodeMap Parent; + public: - typedef typename GR::template NodeMap Parent; - explicit NodeMap(const SmartEdgeSetBase& arcset) : Parent(*arcset._graph) { } @@ -1304,17 +1289,14 @@ /// "Graph" concept. template class SmartEdgeSet : public EdgeSetExtender > { + typedef EdgeSetExtender > Parent; public: - typedef EdgeSetExtender > Parent; - typedef typename Parent::Node Node; typedef typename Parent::Arc Arc; typedef typename Parent::Edge Edge; - typedef GR Graph; - protected: typedef typename Parent::NodesImplBase NodesImplBase; @@ -1331,9 +1313,9 @@ } class NodesImpl : public NodesImplBase { - public: typedef NodesImplBase Parent; + public: NodesImpl(const GR& graph, SmartEdgeSet& arcset) : Parent(graph), _arcset(arcset) {}