lemon/edge_set.h
changeset 2032 18c08f9129e4
parent 1999 2ff283124dfc
child 2076 10681ee9d8ae
equal deleted inserted replaced
8:cc10a3f3be59 9:9c1641627805
   204     } 
   204     } 
   205 
   205 
   206     template <typename _Value>
   206     template <typename _Value>
   207     class NodeMap : public Graph::template NodeMap<_Value> {
   207     class NodeMap : public Graph::template NodeMap<_Value> {
   208     public:
   208     public:
       
   209 
   209       typedef typename _Graph::template NodeMap<_Value> Parent;
   210       typedef typename _Graph::template NodeMap<_Value> Parent;
       
   211 
   210       explicit NodeMap(const ListEdgeSetBase<Graph>& edgeset) 
   212       explicit NodeMap(const ListEdgeSetBase<Graph>& edgeset) 
   211 	: Parent(*edgeset.graph) { }
   213 	: Parent(*edgeset.graph) {}
       
   214 
   212       NodeMap(const ListEdgeSetBase<Graph>& edgeset, const _Value& value)
   215       NodeMap(const ListEdgeSetBase<Graph>& edgeset, const _Value& value)
   213 	: Parent(*edgeset.graph, value) { }
   216 	: Parent(*edgeset.graph, value) {}
       
   217 
       
   218       NodeMap& operator=(const NodeMap& cmap) {
       
   219         return operator=<NodeMap>(cmap);
       
   220       }
       
   221 
       
   222       template <typename CMap>
       
   223       NodeMap& operator=(const CMap& cmap) {
       
   224         Parent::operator=(cmap);
       
   225         return *this;
       
   226       }
   214     };
   227     };
   215 
   228 
   216   };
   229   };
   217 
   230 
   218   /// \ingroup semi_adaptors
   231   /// \ingroup semi_adaptors
   519     } 
   532     } 
   520 
   533 
   521     template <typename _Value>
   534     template <typename _Value>
   522     class NodeMap : public Graph::template NodeMap<_Value> {
   535     class NodeMap : public Graph::template NodeMap<_Value> {
   523     public:
   536     public:
       
   537 
   524       typedef typename _Graph::template NodeMap<_Value> Parent;
   538       typedef typename _Graph::template NodeMap<_Value> Parent;
       
   539 
   525       explicit NodeMap(const SmartEdgeSetBase<Graph>& edgeset) 
   540       explicit NodeMap(const SmartEdgeSetBase<Graph>& edgeset) 
   526 	: Parent(*edgeset.graph) { }
   541 	: Parent(*edgeset.graph) { }
       
   542 
   527       NodeMap(const SmartEdgeSetBase<Graph>& edgeset, const _Value& value)
   543       NodeMap(const SmartEdgeSetBase<Graph>& edgeset, const _Value& value)
   528 	: Parent(*edgeset.graph, value) { }
   544 	: Parent(*edgeset.graph, value) { }
       
   545 
       
   546       NodeMap& operator=(const NodeMap& cmap) {
       
   547         return operator=<NodeMap>(cmap);
       
   548       }
       
   549 
       
   550       template <typename CMap>
       
   551       NodeMap& operator=(const CMap& cmap) {
       
   552         Parent::operator=(cmap);
       
   553         return *this;
       
   554       }
   529     };
   555     };
   530 
   556 
   531   };
   557   };
   532 
   558 
   533 
   559 
   665   protected:
   691   protected:
   666 
   692 
   667     typedef typename Parent::NodesImplBase NodesImplBase;
   693     typedef typename Parent::NodesImplBase NodesImplBase;
   668 
   694 
   669     void eraseNode(const Node& node) {
   695     void eraseNode(const Node& node) {
   670       if (Parent::IncEdgeIt(*this, node) == INVALID) {
   696       if (typename Parent::IncEdgeIt(*this, node) == INVALID) {
   671         return;
   697         return;
   672       }
   698       }
   673       throw UnsupportedOperation();
   699       throw UnsupportedOperation();
   674     }
   700     }
   675     
   701