@@ -31,6 +31,23 @@ template<typename keyt, typename valuet>
31
31
class map_serializert
32
32
{
33
33
public:
34
+ // NOLINTNEXTLINE(readability/identifiers) - name matches those used in STL
35
+ typedef keyt key_type;
36
+ // NOLINTNEXTLINE(readability/identifiers) - name matches those used in STL
37
+ typedef valuet mapped_type;
38
+ // NOLINTNEXTLINE(readability/identifiers) - name matches those used in STL
39
+ typedef std::pair<const keyt, valuet> value_type;
40
+ // NOLINTNEXTLINE(readability/identifiers) - name matches those used in STL
41
+ typedef value_type & reference;
42
+ // NOLINTNEXTLINE(readability/identifiers) - name matches those used in STL
43
+ typedef const value_type & const_reference;
44
+ // NOLINTNEXTLINE(readability/identifiers) - name matches those used in STL
45
+ typedef value_type * pointer;
46
+ // NOLINTNEXTLINE(readability/identifiers) - name matches those used in STL
47
+ typedef const value_type * const_pointer;
48
+ // NOLINTNEXTLINE(readability/identifiers) - name matches those used in STL
49
+ typedef std::size_t size_type;
50
+
34
51
// The type of ranges of map keys
35
52
typedef
36
53
boost::any_range<
@@ -56,7 +73,7 @@ class map_serializert
56
73
Returns the size of the map.
57
74
58
75
\*******************************************************************/
59
- virtual std:: size_t size ()=0;
76
+ virtual size_type size () const =0;
60
77
61
78
/* ******************************************************************\
62
79
@@ -71,7 +88,7 @@ class map_serializert
71
88
Returns all the keys in the map, which could be large.
72
89
73
90
\*******************************************************************/
74
- virtual keys_ranget keys ()=0;
91
+ virtual keys_ranget keys () const =0;
75
92
76
93
/* ******************************************************************\
77
94
@@ -87,7 +104,7 @@ class map_serializert
87
104
Checks whether a given key exists in the map.
88
105
89
106
\*******************************************************************/
90
- virtual bool contains (const keyt &key)=0;
107
+ virtual bool contains (const keyt &key) const =0;
91
108
92
109
/* ******************************************************************\
93
110
@@ -103,7 +120,7 @@ class map_serializert
103
120
Gets the value corresponding to a given key.
104
121
105
122
\*******************************************************************/
106
- virtual valuet at (const keyt &key)=0;
123
+ virtual valuet at (const keyt &key) const =0;
107
124
108
125
/* ******************************************************************\
109
126
0 commit comments