Changes in lemon/concepts/maps.h [28:e337bdf46777:51:90201bb15a8d] in lemon-1.2
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lemon/concepts/maps.h
r28 r51 3 3 * This file is a part of LEMON, a generic C++ optimization library 4 4 * 5 * Copyright (C) 2003-200 75 * Copyright (C) 2003-2008 6 6 * Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport 7 7 * (Egervary Research Group on Combinatorial Optimization, EGRES). … … 42 42 { 43 43 public: 44 /// Map's key type.45 typedef K Key; 46 /// Map's value type. (The type of objects associated with the keys).44 /// The key type of the map. 45 typedef K Key; 46 /// The value type of the map. (The type of objects associated with the keys). 47 47 typedef T Value; 48 48 49 49 /// Returns the value associated with a key. 50 50 51 /// Returns the value associated with a key. 51 52 /// \bug Value shouldn't need to be default constructible. 52 53 /// … … 82 83 { 83 84 public: 84 /// Map's key type.85 typedef K Key; 86 /// Map's value type. (The type of objects associated with the keys).85 /// The key type of the map. 86 typedef K Key; 87 /// The value type of the map. (The type of objects associated with the keys). 87 88 typedef T Value; 88 89 … … 114 115 }; 115 116 116 /// Read/ Writable map concept117 /// Read/writable map concept 117 118 118 119 /// Read/writable map concept. … … 120 121 template<typename K, typename T> 121 122 class ReadWriteMap : public ReadMap<K,T>, 122 123 { 124 public: 125 /// Map's key type.126 typedef K Key; 127 /// Map's value type. (The type of objects associated with the keys).123 public WriteMap<K,T> 124 { 125 public: 126 /// The key type of the map. 127 typedef K Key; 128 /// The value type of the map. (The type of objects associated with the keys). 128 129 typedef T Value; 129 130 … … 147 148 /// Dereferable map concept. 148 149 /// 150 /// \todo Rethink this concept. 149 151 template<typename K, typename T, typename R, typename CR> 150 152 class ReferenceMap : public ReadWriteMap<K,T> … … 153 155 /// Tag for reference maps. 154 156 typedef True ReferenceMapTag; 155 /// Map's key type.156 typedef K Key; 157 /// Map's value type. (The type of objects associated with the keys).158 typedef T Value; 159 /// Map's reference type.157 /// The key type of the map. 158 typedef K Key; 159 /// The value type of the map. (The type of objects associated with the keys). 160 typedef T Value; 161 /// The reference type of the map. 160 162 typedef R Reference; 161 /// Map's const reference type.163 /// The const reference type of the map. 162 164 typedef CR ConstReference; 163 165 … … 166 168 public: 167 169 168 ///Returns a reference to the value associated toa key.170 ///Returns a reference to the value associated with a key. 169 171 Reference operator[](const Key &) { return tmp; } 170 ///Returns a const reference to the value associated toa key.172 ///Returns a const reference to the value associated with a key. 171 173 ConstReference operator[](const Key &) const { return tmp; } 172 174 /// Sets the value associated with a key. 173 175 void set(const Key &k,const Value &t) { operator[](k)=t; } 174 176 175 /// \todo Rethink this concept.176 177 template<typename _ReferenceMap> 177 178 struct ReferenceMapConcept {
Note: See TracChangeset
for help on using the changeset viewer.