lemon/bits/map_extender.h
changeset 296 9768e60aa4e1
parent 209 765619b7cbb2
child 314 2cc60866a0c9
equal deleted inserted replaced
2:7736d124e3df 3:c43f182000b3
    60       : Parent(graph) {}
    60       : Parent(graph) {}
    61 
    61 
    62     MapExtender(const Graph& graph, const Value& value)
    62     MapExtender(const Graph& graph, const Value& value)
    63       : Parent(graph, value) {}
    63       : Parent(graph, value) {}
    64 
    64 
       
    65   private:
    65     MapExtender& operator=(const MapExtender& cmap) {
    66     MapExtender& operator=(const MapExtender& cmap) {
    66       return operator=<MapExtender>(cmap);
    67       return operator=<MapExtender>(cmap);
    67     }
    68     }
    68 
    69 
    69     template <typename CMap>
    70     template <typename CMap>
    70     MapExtender& operator=(const CMap& cmap) {
    71     MapExtender& operator=(const CMap& cmap) {
    71       Parent::operator=(cmap);
    72       Parent::operator=(cmap);
    72       return *this;
    73       return *this;
    73     }
    74     }
    74 
    75 
       
    76   public:
    75     class MapIt : public Item {
    77     class MapIt : public Item {
    76     public:
    78     public:
    77 
    79 
    78       typedef Item Parent;
    80       typedef Item Parent;
    79       typedef typename Map::Value Value;
    81       typedef typename Map::Value Value;
   198       : Parent(_graph), graph(_graph) {}
   200       : Parent(_graph), graph(_graph) {}
   199 
   201 
   200     SubMapExtender(const Graph& _graph, const Value& _value)
   202     SubMapExtender(const Graph& _graph, const Value& _value)
   201       : Parent(_graph, _value), graph(_graph) {}
   203       : Parent(_graph, _value), graph(_graph) {}
   202 
   204 
       
   205   private:
   203     SubMapExtender& operator=(const SubMapExtender& cmap) {
   206     SubMapExtender& operator=(const SubMapExtender& cmap) {
   204       return operator=<MapExtender>(cmap);
   207       return operator=<MapExtender>(cmap);
   205     }
   208     }
   206 
   209 
   207     template <typename CMap>
   210     template <typename CMap>
   212         Parent::set(it, cmap[it]);
   215         Parent::set(it, cmap[it]);
   213       }
   216       }
   214       return *this;
   217       return *this;
   215     }
   218     }
   216 
   219 
       
   220   public:
   217     class MapIt : public Item {
   221     class MapIt : public Item {
   218     public:
   222     public:
   219 
   223 
   220       typedef Item Parent;
   224       typedef Item Parent;
   221       typedef typename Map::Value Value;
   225       typedef typename Map::Value Value;