1 //===-- TypeList.h ----------------------------------------------*- C++ -*-===//
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //===----------------------------------------------------------------------===//
9 #ifndef liblldb_TypeList_h_
10 #define liblldb_TypeList_h_
12 #include "lldb/Symbol/Type.h"
13 #include "lldb/Utility/Iterable.h"
14 #include "lldb/lldb-private.h"
18 namespace lldb_private {
22 // Constructors and Destructors
29 void Dump(Stream *s, bool show_context);
32 // FindType(lldb::user_id_t uid);
34 TypeList FindTypes(ConstString name);
36 void Insert(const lldb::TypeSP &type);
38 uint32_t GetSize() const;
40 lldb::TypeSP GetTypeAtIndex(uint32_t idx);
42 typedef std::vector<lldb::TypeSP> collection;
43 typedef AdaptedIterable<collection, lldb::TypeSP, vector_adapter>
46 TypeIterable Types() { return TypeIterable(m_types); }
49 std::function<bool(const lldb::TypeSP &type_sp)> const &callback) const;
51 void ForEach(std::function<bool(lldb::TypeSP &type_sp)> const &callback);
53 void RemoveMismatchedTypes(const char *qualified_typename, bool exact_match);
55 void RemoveMismatchedTypes(const std::string &type_scope,
56 const std::string &type_basename,
57 lldb::TypeClass type_class, bool exact_match);
59 void RemoveMismatchedTypes(lldb::TypeClass type_class);
62 typedef collection::iterator iterator;
63 typedef collection::const_iterator const_iterator;
67 DISALLOW_COPY_AND_ASSIGN(TypeList);
70 } // namespace lldb_private
72 #endif // liblldb_TypeList_h_