lemon/bits/default_map.h
changeset 641 756a5ec551c8
parent 535 6a17a722b50e
child 627 20dac2104519
equal deleted inserted replaced
10:5eadbef05015 11:c54d0ea312a3
   151 
   151 
   152   // DefaultMap class
   152   // DefaultMap class
   153   template <typename _Graph, typename _Item, typename _Value>
   153   template <typename _Graph, typename _Item, typename _Value>
   154   class DefaultMap
   154   class DefaultMap
   155     : public DefaultMapSelector<_Graph, _Item, _Value>::Map {
   155     : public DefaultMapSelector<_Graph, _Item, _Value>::Map {
       
   156     typedef typename DefaultMapSelector<_Graph, _Item, _Value>::Map Parent;
       
   157 
   156   public:
   158   public:
   157     typedef typename DefaultMapSelector<_Graph, _Item, _Value>::Map Parent;
       
   158     typedef DefaultMap<_Graph, _Item, _Value> Map;
   159     typedef DefaultMap<_Graph, _Item, _Value> Map;
   159 
   160     
   160     typedef typename Parent::Graph Graph;
   161     typedef typename Parent::GraphType GraphType;
   161     typedef typename Parent::Value Value;
   162     typedef typename Parent::Value Value;
   162 
   163 
   163     explicit DefaultMap(const Graph& graph) : Parent(graph) {}
   164     explicit DefaultMap(const GraphType& graph) : Parent(graph) {}
   164     DefaultMap(const Graph& graph, const Value& value)
   165     DefaultMap(const GraphType& graph, const Value& value)
   165       : Parent(graph, value) {}
   166       : Parent(graph, value) {}
   166 
   167 
   167     DefaultMap& operator=(const DefaultMap& cmap) {
   168     DefaultMap& operator=(const DefaultMap& cmap) {
   168       return operator=<DefaultMap>(cmap);
   169       return operator=<DefaultMap>(cmap);
   169     }
   170     }