CBMC
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
fixed_keys_map_wrapper.h
Go to the documentation of this file.
1// Copyright 2018 Diffblue Limited.
2
6
7#ifndef CPROVER_UTIL_FIXED_KEYS_MAP_WRAPPER_H
8#define CPROVER_UTIL_FIXED_KEYS_MAP_WRAPPER_H
9
10template <typename mapt>
12{
13private:
14 mapt &map;
15
16public:
17 // NOLINTNEXTLINE(readability/identifiers) - should match STL
18 typedef typename mapt::iterator iterator;
19 // NOLINTNEXTLINE(readability/identifiers) - should match STL
20 typedef typename mapt::const_iterator const_iterator;
21 // NOLINTNEXTLINE(readability/identifiers) - should match STL
22 typedef typename mapt::reverse_iterator reverse_iterator;
23 // NOLINTNEXTLINE(readability/identifiers) - should match STL
24 typedef typename mapt::const_reverse_iterator const_reverse_iterator;
25 // NOLINTNEXTLINE(readability/identifiers) - should match STL
26 typedef typename mapt::key_type key_type;
27 // NOLINTNEXTLINE(readability/identifiers) - should match STL
28 typedef typename mapt::mapped_type mapped_type;
29 // NOLINTNEXTLINE(readability/identifiers) - should match STL
30 typedef typename mapt::size_type size_type;
31
33 {
34 }
35
37 {
38 return map.begin();
39 }
41 {
42 return map.begin();
43 }
45 {
46 return map.end();
47 }
49 {
50 return map.end();
51 }
53 {
54 return map.rbegin();
55 }
57 {
58 return map.rbegin();
59 }
61 {
62 return map.rend();
63 }
65 {
66 return map.rend();
67 }
69 {
70 return map.begin();
71 }
73 {
74 return map.end();
75 }
77 {
78 return map.rbegin();
79 }
81 {
82 return map.rend();
83 }
84
85 bool empty() const
86 {
87 return map.empty();
88 }
90 {
91 return map.size();
92 }
94 {
95 return map.count(key);
96 }
97
98 const mapped_type &at(const key_type &key) const
99 {
100 return map.at(key);
101 }
103 {
104 return map.at(key);
105 }
106
108 {
109 return map.find(key);
110 }
112 {
113 return map.find(key);
114 }
115};
116
117#endif // CPROVER_UTIL_FIXED_KEYS_MAP_WRAPPER_H
ait supplies three of the four components needed: an abstract interpreter (in this case handling func...
Definition ai.h:562
mapt::reverse_iterator reverse_iterator
mapt::const_reverse_iterator const_reverse_iterator
mapped_type & at(const key_type &key)
const_iterator end() const
mapt::const_iterator const_iterator
const_iterator cbegin() const
const_iterator cend() const
const_iterator begin() const
size_type count(const key_type &key) const
const_reverse_iterator rend() const
const_reverse_iterator rbegin() const
const_reverse_iterator crend() const
const_iterator find(const key_type &key) const
const mapped_type & at(const key_type &key) const
iterator find(const key_type &key)
const_reverse_iterator crbegin() const