1.1 --- a/src/hugo/vector_map_factory.h Thu Sep 02 15:13:21 2004 +0000
1.2 +++ b/src/hugo/vector_map_factory.h Thu Sep 02 15:21:13 2004 +0000
1.3 @@ -30,7 +30,7 @@
1.4 /// The graph type of the maps.
1.5 typedef typename MapRegistry::Graph Graph;
1.6 /// The key type of the maps.
1.7 - typedef typename MapRegistry::Key Key;
1.8 + typedef typename MapRegistry::KeyType KeyType;
1.9 /// The iterator to iterate on the keys.
1.10 typedef typename MapRegistry::KeyIt KeyIt;
1.11
1.12 @@ -112,7 +112,7 @@
1.13 * The subscript operator. The map can be subscripted by the
1.14 * actual keys of the graph.
1.15 */
1.16 - typename Container::reference operator[](const Key& key) {
1.17 + typename Container::reference operator[](const KeyType& key) {
1.18 int id = getGraph()->id(key);
1.19 return container[id];
1.20 }
1.21 @@ -121,7 +121,7 @@
1.22 * The const subscript operator. The map can be subscripted by the
1.23 * actual keys of the graph.
1.24 */
1.25 - typename Container::const_reference operator[](const Key& key) const {
1.26 + typename Container::const_reference operator[](const KeyType& key) const {
1.27 int id = getGraph()->id(key);
1.28 return container[id];
1.29 }
1.30 @@ -129,14 +129,14 @@
1.31 /** Setter function of the map. Equivalent with map[key] = val.
1.32 * This is a compatibility feature with the not dereferable maps.
1.33 */
1.34 - void set(const Key& key, const Value& val) {
1.35 + void set(const KeyType& key, const Value& val) {
1.36 int id = getGraph()->id(key);
1.37 container[id] = val;
1.38 }
1.39
1.40 /** Add a new key to the map. It called by the map registry.
1.41 */
1.42 - void add(const Key& key) {
1.43 + void add(const KeyType& key) {
1.44 int id = getGraph()->id(key);
1.45 if (id >= container.size()) {
1.46 container.resize(id + 1);
1.47 @@ -145,7 +145,7 @@
1.48
1.49 /** Erase a key from the map. It called by the map registry.
1.50 */
1.51 - void erase(const Key& key) {}
1.52 + void erase(const KeyType& key) {}
1.53
1.54 /** Clear the data structure.
1.55 */
1.56 @@ -172,7 +172,7 @@
1.57 */
1.58 iterator() {}
1.59
1.60 - typedef extended_pair<const Key&, const Key&,
1.61 + typedef extended_pair<const KeyType&, const KeyType&,
1.62 Value&, Value&> Reference;
1.63
1.64 /** Dereference operator for map.
1.65 @@ -185,7 +185,7 @@
1.66 friend class iterator;
1.67 private:
1.68 Reference data;
1.69 - Pointer(const Key& key, Value& val) : data(key, val) {}
1.70 + Pointer(const KeyType& key, Value& val) : data(key, val) {}
1.71 public:
1.72 Reference* operator->() {return &data;}
1.73 };
1.74 @@ -262,7 +262,7 @@
1.75 */
1.76 const_iterator(iterator p_it) : map(p_it.map), it(p_it.it) {}
1.77
1.78 - typedef extended_pair<const Key&, const Key&,
1.79 + typedef extended_pair<const KeyType&, const KeyType&,
1.80 const Value&, const Value&> Reference;
1.81
1.82 /** Dereference operator for map.
1.83 @@ -276,7 +276,7 @@
1.84 friend class const_iterator;
1.85 private:
1.86 Reference data;
1.87 - Pointer(const Key& key, const Value& val) : data(key, val) {}
1.88 + Pointer(const KeyType& key, const Value& val) : data(key, val) {}
1.89 public:
1.90 Reference* operator->() {return &data;}
1.91 };