1 //===-- TypeList.h ----------------------------------------------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 #ifndef liblldb_TypeList_h_
11 #define liblldb_TypeList_h_
13 #include "lldb/Symbol/Type.h"
14 #include "lldb/Utility/Iterable.h"
15 #include "lldb/lldb-private.h"
19 namespace lldb_private {
23 //------------------------------------------------------------------
24 // Constructors and Destructors
25 //------------------------------------------------------------------
32 void Dump(Stream *s, bool show_context);
35 // FindType(lldb::user_id_t uid);
37 TypeList FindTypes(const ConstString &name);
39 void Insert(const lldb::TypeSP &type);
41 uint32_t GetSize() const;
43 lldb::TypeSP GetTypeAtIndex(uint32_t idx);
45 typedef std::vector<lldb::TypeSP> collection;
46 typedef AdaptedIterable<collection, lldb::TypeSP, vector_adapter>
49 TypeIterable Types() { return TypeIterable(m_types); }
52 std::function<bool(const lldb::TypeSP &type_sp)> const &callback) const;
54 void ForEach(std::function<bool(lldb::TypeSP &type_sp)> const &callback);
56 void RemoveMismatchedTypes(const char *qualified_typename, bool exact_match);
58 void RemoveMismatchedTypes(const std::string &type_scope,
59 const std::string &type_basename,
60 lldb::TypeClass type_class, bool exact_match);
62 void RemoveMismatchedTypes(lldb::TypeClass type_class);
65 typedef collection::iterator iterator;
66 typedef collection::const_iterator const_iterator;
70 DISALLOW_COPY_AND_ASSIGN(TypeList);
73 } // namespace lldb_private
75 #endif // liblldb_TypeList_h_