src/hugo/vector_map_factory.h
changeset 799 3393abe30678
parent 798 6d1abeb62dd3
child 804 6874a72dbdc5
equal deleted inserted replaced
3:1df41ef468f4 4:b46b88e7b046
   126 		
   126 		
   127       /**
   127       /**
   128        * The subscript operator. The map can be subscripted by the
   128        * The subscript operator. The map can be subscripted by the
   129        * actual keys of the graph. 
   129        * actual keys of the graph. 
   130        */
   130        */
   131 <<<<<<< .mine
   131       Reference operator[](const KeyType& key) {
   132       Reference operator[](const Key& key) {
       
   133 =======
       
   134       typename Container::reference operator[](const KeyType& key) {
       
   135 >>>>>>> .r1091
       
   136 	int id = getGraph()->id(key);
   132 	int id = getGraph()->id(key);
   137 	return container[id];
   133 	return container[id];
   138       } 
   134       } 
   139 		
   135 		
   140       /**
   136       /**
   141        * The const subscript operator. The map can be subscripted by the
   137        * The const subscript operator. The map can be subscripted by the
   142        * actual keys of the graph. 
   138        * actual keys of the graph. 
   143        */
   139        */
   144 <<<<<<< .mine
   140       ConstReference operator[](const KeyType& key) const {
   145       ConstReference operator[](const Key& key) const {
       
   146 =======
       
   147       typename Container::const_reference operator[](const KeyType& key) const {
       
   148 >>>>>>> .r1091
       
   149 	int id = getGraph()->id(key);
   141 	int id = getGraph()->id(key);
   150 	return container[id];
   142 	return container[id];
   151       }
   143       }
   152 
   144 
   153       /** Setter function of the map. Equivalent with map[key] = val.
   145       /** Setter function of the map. Equivalent with map[key] = val.
   207 
   199 
   208 	class Pointer {
   200 	class Pointer {
   209 	  friend class iterator;
   201 	  friend class iterator;
   210 	private:
   202 	private:
   211 	  Reference data;
   203 	  Reference data;
   212 	  Pointer(const KeyType& key, Value& val) : data(key, val) {}
   204 	  Pointer(const KeyType& key, Map::Reference val) : data(key, val) {}
   213 	public:
   205 	public:
   214 	  Reference* operator->() {return &data;}
   206 	  Reference* operator->() {return &data;}
   215 	};
   207 	};
   216 
   208 
   217 	/** Arrow operator for map.
   209 	/** Arrow operator for map.
   298 
   290 
   299 	class Pointer {
   291 	class Pointer {
   300 	  friend class const_iterator;
   292 	  friend class const_iterator;
   301 	private:
   293 	private:
   302 	  Reference data;
   294 	  Reference data;
   303 	  Pointer(const KeyType& key, const Value& val) : data(key, val) {}
   295 	  Pointer(const KeyType& key, Map::ConstReference val) 
       
   296 	    : data(key, val) {}
   304 	public:
   297 	public:
   305 	  Reference* operator->() {return &data;}
   298 	  Reference* operator->() {return &data;}
   306 	};
   299 	};
   307 
   300 
   308 	/** Arrow operator for map.
   301 	/** Arrow operator for map.