MCPcopy Create free account
hub / github.com/cppcheck-opensource/cppcheck / Container

Class Container

lib/library.h:188–266  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

186 bool isScopeNoReturn(const Token *end, std::string *unknownFunc) const;
187
188 class Container {
189 public:
190 Container() = default;
191
192 enum class Action : std::uint8_t {
193 RESIZE,
194 CLEAR,
195 PUSH,
196 POP,
197 FIND,
198 FIND_CONST,
199 INSERT,
200 ERASE,
201 APPEND,
202 CHANGE_CONTENT,
203 CHANGE,
204 CHANGE_INTERNAL,
205 NO_ACTION
206 };
207 enum class Yield : std::uint8_t {
208 AT_INDEX,
209 ITEM,
210 BUFFER,
211 BUFFER_NT,
212 START_ITERATOR,
213 END_ITERATOR,
214 ITERATOR,
215 SIZE,
216 EMPTY,
217 NO_YIELD
218 };
219 struct Function {
220 Action action;
221 Yield yield;
222 std::string returnType;
223 };
224 struct RangeItemRecordTypeItem {
225 std::string name;
226 int templateParameter; // TODO: use this
227 };
228 std::string startPattern, startPattern2, endPattern, itEndPattern;
229 std::map<std::string, Function> functions;
230 int type_templateArgNo = -1;
231 std::vector<RangeItemRecordTypeItem> rangeItemRecordType;
232 int size_templateArgNo = -1;
233 bool arrayLike_indexOp{};
234 bool stdStringLike{};
235 bool stdAssociativeLike{};
236 bool opLessAllowed = true;
237 bool hasInitializerListConstructor{};
238 bool unstableErase{};
239 bool unstableInsert{};
240 bool view{};
241 bool startPatternHasStd{};
242
243 Action getAction(const std::string& function) const {
244 const auto i = functions.find(function);
245 if (i != functions.end())

Callers

nothing calls this directly

Calls 3

toStringFunction · 0.70
findMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected