TypeList.h revision dc0a38c5a727cae5362b218a3180d0f4265a619d
1//===-- TypeList.h ----------------------------------------------*- C++ -*-===// 2// 3// The LLVM Compiler Infrastructure 4// 5// This file is distributed under the University of Illinois Open Source 6// License. See LICENSE.TXT for details. 7// 8//===----------------------------------------------------------------------===// 9 10#ifndef liblldb_TypeList_h_ 11#define liblldb_TypeList_h_ 12 13#include "lldb/lldb-private.h" 14#include "lldb/Symbol/Type.h" 15#include <map> 16 17namespace lldb_private { 18 19class TypeList 20{ 21public: 22 //------------------------------------------------------------------ 23 // Constructors and Destructors 24 //------------------------------------------------------------------ 25 TypeList(); 26 27 virtual 28 ~TypeList(); 29 30 void 31 Clear(); 32 33 void 34 Dump(Stream *s, bool show_context); 35 36// lldb::TypeSP 37// FindType(lldb::user_id_t uid); 38 39 TypeList 40 FindTypes(const ConstString &name); 41 42 void 43 Insert (const lldb::TypeSP& type); 44 45 bool 46 InsertUnique (const lldb::TypeSP& type); 47 48 uint32_t 49 GetSize() const; 50 51 lldb::TypeSP 52 GetTypeAtIndex(uint32_t idx); 53 54 bool 55 RemoveTypeWithUID (lldb::user_id_t uid); 56 57 void 58 RemoveMismatchedTypes (const char *qualified_typename, 59 bool exact_match); 60 61 void 62 RemoveMismatchedTypes (const std::string &type_scope, 63 const std::string &type_basename, 64 bool exact_match); 65private: 66 typedef std::multimap<lldb::user_id_t, lldb::TypeSP> collection; 67 typedef collection::iterator iterator; 68 typedef collection::const_iterator const_iterator; 69 70 collection m_types; 71 72 DISALLOW_COPY_AND_ASSIGN (TypeList); 73}; 74 75} // namespace lldb_private 76 77#endif // liblldb_TypeList_h_ 78