Changeset 720:193d881b23ad in lemon-0.x
- Timestamp:
- 07/21/04 19:38:02 (20 years ago)
- Branch:
- default
- Phase:
- public
- Convert:
- svn:c9d7d8f5-90d6-0310-b91f-818b3a526b0e/lemon/trunk@974
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/hugo/maps.h
r539 r720 13 13 namespace hugo { 14 14 15 /// Base class of maps. 16 17 template<typename K, typename T> 18 class MapBase 19 { 20 public: 21 /// 22 typedef K KeyType; 23 /// 24 typedef T ValueType; 25 }; 26 15 27 /// Null map. (aka DoNothingMap) 16 28 … … 19 31 /// data written to it... 20 32 template<typename K, typename T> 21 class NullMap 33 class NullMap : public MapBase<K,T> 22 34 { 23 35 public: 24 typedef K KeyType;25 typedef T ValueType;26 36 27 37 T operator[](const K&) const { return T(); } … … 38 48 /// In other aspects it is equivalent to the \ref NullMap 39 49 template<typename K, typename T> 40 class ConstMap 50 class ConstMap : public MapBase<K,T> 41 51 { 42 52 T v; 43 53 public: 44 typedef K KeyType;45 typedef T ValueType;46 54 47 55 ConstMap() {}
Note: See TracChangeset
for help on using the changeset viewer.