Changes in lemon/concepts/maps.h [28:e337bdf46777:25:751cd8f9bb1c] in lemon
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
lemon/concepts/maps.h
r28 r25 35 35 36 36 /// Readable map concept 37 38 /// Readable map concept.39 ///40 37 template<typename K, typename T> 41 38 class ReadMap … … 49 46 /// Returns the value associated with a key. 50 47 51 /// \bug Value should n't need to be default constructible.48 /// \bug Value should n't need to be default constructible. 52 49 /// 53 50 Value operator[](const Key &) const {return Value();} … … 75 72 76 73 /// Writable map concept 77 78 /// Writable map concept.79 ///80 74 template<typename K, typename T> 81 75 class WriteMap … … 114 108 }; 115 109 116 /// Read/Writable map concept 117 118 /// Read/writable map concept. 119 /// 110 ///Read/Writable map concept 120 111 template<typename K, typename T> 121 112 class ReadWriteMap : public ReadMap<K,T>, … … 143 134 144 135 145 /// Dereferable map concept 146 147 /// Dereferable map concept. 148 /// 136 ///Dereferable map concept 149 137 template<typename K, typename T, typename R, typename CR> 150 138 class ReferenceMap : public ReadWriteMap<K,T> … … 169 157 Reference operator[](const Key &) { return tmp; } 170 158 ///Returns a const reference to the value associated to a key. 171 ConstReference operator[](const Key &) const { return tmp; } 159 ConstReference operator[](const Key &) const 160 { return tmp; } 172 161 /// Sets the value associated with a key. 173 162 void set(const Key &k,const Value &t) { operator[](k)=t; } 174 163 175 // / \todo Rethink this concept.164 // \todo rethink this concept 176 165 template<typename _ReferenceMap> 177 166 struct ReferenceMapConcept { … … 202 191 203 192 } //namespace concepts 204 205 193 } //namespace lemon 206 207 194 #endif // LEMON_CONCEPT_MAPS_H
Note: See TracChangeset
for help on using the changeset viewer.