lemon/graph_adaptor.h
changeset 1762 3915867b6975
parent 1725 22752dd6c693
child 1791 62e7d237e1fb
equal deleted inserted replaced
11:f5925f1665e6 12:89b18a0b6919
   125 
   125 
   126     template <typename _Value>
   126     template <typename _Value>
   127     class NodeMap : public _Graph::template NodeMap<_Value> {
   127     class NodeMap : public _Graph::template NodeMap<_Value> {
   128     public:
   128     public:
   129       typedef typename _Graph::template NodeMap<_Value> Parent;
   129       typedef typename _Graph::template NodeMap<_Value> Parent;
   130       NodeMap(const GraphAdaptorBase<_Graph>& gw) : Parent(*gw.graph) { }
   130       explicit NodeMap(const GraphAdaptorBase<_Graph>& gw) 
       
   131 	: Parent(*gw.graph) { }
   131       NodeMap(const GraphAdaptorBase<_Graph>& gw, const _Value& value)
   132       NodeMap(const GraphAdaptorBase<_Graph>& gw, const _Value& value)
   132       : Parent(*gw.graph, value) { }
   133 	: Parent(*gw.graph, value) { }
   133     };
   134     };
   134 
   135 
   135     template <typename _Value>
   136     template <typename _Value>
   136     class EdgeMap : public _Graph::template EdgeMap<_Value> {
   137     class EdgeMap : public _Graph::template EdgeMap<_Value> {
   137     public:
   138     public:
   138       typedef typename _Graph::template EdgeMap<_Value> Parent;
   139       typedef typename _Graph::template EdgeMap<_Value> Parent;
   139       EdgeMap(const GraphAdaptorBase<_Graph>& gw) : Parent(*gw.graph) { }
   140       explicit EdgeMap(const GraphAdaptorBase<_Graph>& gw) 
       
   141 	: Parent(*gw.graph) { }
   140       EdgeMap(const GraphAdaptorBase<_Graph>& gw, const _Value& value)
   142       EdgeMap(const GraphAdaptorBase<_Graph>& gw, const _Value& value)
   141       : Parent(*gw.graph, value) { }
   143 	: Parent(*gw.graph, value) { }
   142     };
   144     };
   143 
   145 
   144   };
   146   };
   145 
   147 
   146   template <typename _Graph>
   148   template <typename _Graph>
   151     typedef IterableGraphExtender<GraphAdaptorBase<_Graph> > Parent;
   153     typedef IterableGraphExtender<GraphAdaptorBase<_Graph> > Parent;
   152   protected:
   154   protected:
   153     GraphAdaptor() : Parent() { }
   155     GraphAdaptor() : Parent() { }
   154 
   156 
   155   public:
   157   public:
   156     GraphAdaptor(Graph& _graph) { setGraph(_graph); }
   158     explicit GraphAdaptor(Graph& _graph) { setGraph(_graph); }
   157   };
   159   };
   158 
   160 
   159   template <typename _Graph>
   161   template <typename _Graph>
   160   class RevGraphAdaptorBase : public GraphAdaptorBase<_Graph> {
   162   class RevGraphAdaptorBase : public GraphAdaptorBase<_Graph> {
   161   public:
   163   public:
   209     typedef IterableGraphExtender<
   211     typedef IterableGraphExtender<
   210       RevGraphAdaptorBase<_Graph> > Parent;
   212       RevGraphAdaptorBase<_Graph> > Parent;
   211   protected:
   213   protected:
   212     RevGraphAdaptor() { }
   214     RevGraphAdaptor() { }
   213   public:
   215   public:
   214     RevGraphAdaptor(_Graph& _graph) { setGraph(_graph); }
   216     explicit RevGraphAdaptor(_Graph& _graph) { setGraph(_graph); }
   215   };
   217   };
   216 
   218 
   217   
   219   
   218   template <typename _Graph, typename NodeFilterMap, 
   220   template <typename _Graph, typename NodeFilterMap, 
   219 	    typename EdgeFilterMap, bool checked = true>
   221 	    typename EdgeFilterMap, bool checked = true>