Changeset 1719:674182524bd9 in lemon-0.x
- Timestamp:
- 10/14/05 12:48:34 (17 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@2246
- Location:
- lemon
- Files:
-
- 1 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
lemon/bits/array_map.h
r1703 r1719 49 49 typedef _Item Item; 50 50 public: 51 typedef True AdaptibleTag;52 53 51 /// The graph type of the maps. 54 52 typedef _Graph Graph; 53 /// The reference map tag. 54 typedef True ReferenceMapTag; 55 55 56 /// The key type of the maps. 56 57 typedef _Item Key; 58 /// The value type of the map. 59 typedef _Value Value; 60 /// The const reference type of the map. 61 typedef const _Value& ConstReference; 62 /// The reference type of the map. 63 typedef _Value& Reference; 64 65 typedef const Value ConstValue; 66 typedef Value* Pointer; 67 typedef const Value* ConstPointer; 57 68 58 69 typedef AlterationNotifier<_Item> Registry; … … 61 72 typedef typename Registry::ObserverBase Parent; 62 73 63 /// The value type of the map.64 typedef _Value Value;65 74 66 75 … … 71 80 public: 72 81 73 /// \brief Graph and Registryinitialized map constructor.74 /// 75 /// Graph and Registryinitialized map constructor.82 /// \brief Graph initialized map constructor. 83 /// 84 /// Graph initialized map constructor. 76 85 ArrayMap(const Graph& _g) : graph(&_g) { 77 86 Item it; -
lemon/bits/map_iterator.h
r1587 r1719 105 105 typedef typename Parent::ItemIt ItemIt; 106 106 107 typedef typename ReferenceMapTraits<_Map>::Value MapValue;108 typedef typename ReferenceMapTraits<_Map>::Reference MapReference;107 typedef typename _Map::Value MapValue; 108 typedef typename _Map::Reference MapReference; 109 109 110 110 public: … … 195 195 typedef typename Parent::ItemIt ItemIt; 196 196 197 typedef typename ReferenceMapTraits<_Map>::Value MapValue; 198 typedef typename ReferenceMapTraits<_Map>::ConstReference 199 MapReference; 197 typedef typename _Map::Value MapValue; 198 typedef typename _Map::ConstReference MapReference; 200 199 201 200 public: … … 354 353 355 354 /// The value type of the iterator. 356 typedef typename ReferenceMapTraits<Map>::Value MapValue;355 typedef typename Map::Value MapValue; 357 356 /// The reference type of the iterator. 358 typedef typename ReferenceMapTraits<Map>::Reference MapReference;357 typedef typename Map::Reference MapReference; 359 358 /// The pointer type of the iterator. 360 typedef typename ReferenceMapTraits<Map>::Pointer MapPointer;359 typedef typename Map::Pointer MapPointer; 361 360 362 361 public: … … 434 433 435 434 /// The value type of the iterator. 436 typedef typename ReferenceMapTraits<Map>::Value MapValue;435 typedef typename Map::Value MapValue; 437 436 /// The reference type of the iterator. 438 typedef typename ReferenceMapTraits<Map>::ConstReference MapReference;437 typedef typename Map::ConstReference MapReference; 439 438 /// The pointer type of the iterator. 440 typedef typename ReferenceMapTraits<Map>::ConstPointer MapPointer;439 typedef typename Map::ConstPointer MapPointer; 441 440 442 441 public: -
lemon/bits/static_map.h
r1703 r1719 63 63 }; 64 64 65 typedef True AdaptibleTag;65 private: 66 66 67 typedef std::vector<_Value> Container; 68 69 public: 70 67 71 /// The graph type of the map. 68 72 typedef _Graph Graph; 73 /// The reference map tag. 74 typedef True ReferenceMapTag; 75 69 76 /// The key type of the map. 70 77 typedef _Item Key; 71 /// The id map type of the map.72 typedef AlterationNotifier<_Item> Registry;73 78 /// The value type of the map. 74 79 typedef _Value Value; 80 /// The const reference type of the map. 81 typedef typename Container::const_reference ConstReference; 82 /// The reference type of the map. 83 typedef typename Container::reference Reference; 84 85 typedef const Value ConstValue; 86 typedef Value* Pointer; 87 typedef const Value* ConstPointer; 88 89 typedef AlterationNotifier<_Item> Registry; 75 90 76 91 /// The map type. … … 78 93 /// The base class of the map. 79 94 typedef typename Registry::ObserverBase Parent; 80 81 private:82 83 typedef std::vector<Value> Container;84 85 public:86 95 87 96 /// \brief Constructor to attach the new map into the registry. … … 141 150 142 151 public: 143 144 typedef typename Container::reference Reference;145 typedef typename Container::pointer Pointer;146 typedef const Value ConstValue;147 typedef typename Container::const_reference ConstReference;148 typedef typename Container::const_pointer ConstPointer;149 152 150 153 /// \brief The subcript operator. -
lemon/bits/vector_map.h
r1703 r1719 56 56 > 57 57 class VectorMap : public AlterationNotifier<_Item>::ObserverBase { 58 private: 59 60 /// The container type of the map. 61 typedef std::vector<_Value> Container; 62 58 63 public: 59 64 60 typedef True AdaptibleTag;61 62 65 /// The graph type of the map. 63 66 typedef _Graph Graph; 67 /// The reference map tag. 68 typedef True ReferenceMapTag; 69 64 70 /// The key type of the map. 65 71 typedef _Item Key; 66 /// The id map type of the map.67 typedef AlterationNotifier<_Item> Registry;68 72 /// The value type of the map. 69 73 typedef _Value Value; 74 /// The const reference type of the map. 75 typedef typename Container::const_reference ConstReference; 76 /// The reference type of the map. 77 typedef typename Container::reference Reference; 78 79 typedef const Value ConstValue; 80 typedef Value* Pointer; 81 typedef const Value* ConstPointer; 82 83 typedef AlterationNotifier<_Item> Registry; 70 84 71 85 /// The map type. … … 73 87 /// The base class of the map. 74 88 typedef typename Registry::ObserverBase Parent; 75 76 private:77 78 /// The container type of the map.79 typedef std::vector<Value> Container;80 81 public:82 89 83 90 /// The reference type of the map; -
lemon/concept/maps.h
r1435 r1719 18 18 #define LEMON_CONCEPT_MAPS_H 19 19 20 #include <lemon/utility.h> 20 21 #include <lemon/concept_check.h> 21 22 … … 98 99 Key& key; 99 100 typename _WriteMap::Key& own_key; 100 WriteMap& m;101 _WriteMap& m; 101 102 102 103 }; … … 123 124 void constraints() { 124 125 checkConcept<ReadMap<K, T>, _ReadWriteMap >(); 125 checkConcept< ReadMap<K, T>, _ReadWriteMap >();126 checkConcept<WriteMap<K, T>, _ReadWriteMap >(); 126 127 } 127 128 }; … … 134 135 { 135 136 public: 137 /// Tag for reference maps. 138 typedef True ReferenceMapTag; 136 139 /// Map's key type. 137 140 typedef K Key; … … 177 180 Value& val; 178 181 Reference& ref; 179 ReferenceMap& m;182 _ReferenceMap& m; 180 183 }; 181 184 };
Note: See TracChangeset
for help on using the changeset viewer.