equal
deleted
inserted
replaced
33 /// It provides the necessary <tt>typedef</tt>s required by the map concept. |
33 /// It provides the necessary <tt>typedef</tt>s required by the map concept. |
34 template<typename K, typename T> |
34 template<typename K, typename T> |
35 class MapBase |
35 class MapBase |
36 { |
36 { |
37 public: |
37 public: |
38 /// . |
38 ///\e |
39 typedef K KeyType; |
39 typedef K KeyType; |
40 /// . |
40 ///\e |
41 typedef T ValueType; |
41 typedef T ValueType; |
42 }; |
42 }; |
43 |
43 |
44 /// Null map. (a.k.a. DoNothingMap) |
44 /// Null map. (a.k.a. DoNothingMap) |
45 |
45 |
72 /// Default constructor |
72 /// Default constructor |
73 |
73 |
74 /// The value of the map will be uninitialized. |
74 /// The value of the map will be uninitialized. |
75 /// (More exactly it will be default constructed.) |
75 /// (More exactly it will be default constructed.) |
76 ConstMap() {} |
76 ConstMap() {} |
77 /// . |
77 ///\e |
78 |
78 |
79 /// \param _v The initial value of the map. |
79 /// \param _v The initial value of the map. |
|
80 /// |
80 ConstMap(const T &_v) : v(_v) {} |
81 ConstMap(const T &_v) : v(_v) {} |
81 |
82 |
82 T operator[](const K&) const { return v; } |
83 T operator[](const K&) const { return v; } |
83 void set(const K&, const T&) {} |
84 void set(const K&, const T&) {} |
84 |
85 |