LLDB API Documentation

SBType.h
Go to the documentation of this file.
1 //===-- SBType.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 LLDB_SBType_h_
11 #define LLDB_SBType_h_
12 
13 #include "lldb/API/SBDefines.h"
14 
15 namespace lldb {
16 
17 class SBTypeList;
18 
20 {
21 public:
22  SBTypeMember ();
23 
24  SBTypeMember (const lldb::SBTypeMember& rhs);
25 
26  ~SBTypeMember();
27 
29  operator = (const lldb::SBTypeMember& rhs);
30 
31  bool
32  IsValid() const;
33 
34  const char *
35  GetName ();
36 
38  GetType ();
39 
40  uint64_t
42 
43  uint64_t
45 
46  bool
47  IsBitfield();
48 
49  uint32_t
51 
52  bool
53  GetDescription (lldb::SBStream &description,
54  lldb::DescriptionLevel description_level);
55 
56 protected:
57  friend class SBType;
58 
59  void
60  reset (lldb_private::TypeMemberImpl *);
61 
62  lldb_private::TypeMemberImpl &
63  ref ();
64 
65  const lldb_private::TypeMemberImpl &
66  ref () const;
67 
68  std::unique_ptr<lldb_private::TypeMemberImpl> m_opaque_ap;
69 };
70 
71 class SBType
72 {
73 public:
74 
75  SBType();
76 
77  SBType (const lldb::SBType &rhs);
78 
79  ~SBType ();
80 
81  bool
82  IsValid() const;
83 
84  uint64_t
85  GetByteSize();
86 
87  bool
88  IsPointerType();
89 
90  bool
92 
93  bool
94  IsFunctionType ();
95 
96  bool
98 
100  GetPointerType();
101 
103  GetPointeeType();
104 
107 
110 
113 
116  // Get the "lldb::BasicType" enumeration for a type. If a type is not a basic
117  // type eBasicTypeInvalid will be returned
118  lldb::BasicType
119  GetBasicType();
120 
121  // The call below confusing and should really be renamed to "CreateBasicType"
123  GetBasicType(lldb::BasicType type);
124 
125  uint32_t
127 
128  uint32_t
130 
131  uint32_t
133 
135  GetFieldAtIndex (uint32_t idx);
136 
138  GetDirectBaseClassAtIndex (uint32_t idx);
139 
141  GetVirtualBaseClassAtIndex (uint32_t idx);
142 
143  uint32_t
145 
147  GetTemplateArgumentType (uint32_t idx);
148 
149  lldb::TemplateArgumentKind
150  GetTemplateArgumentKind (uint32_t idx);
151 
154 
157 
158  const char*
159  GetName();
160 
161  lldb::TypeClass
162  GetTypeClass ();
163 
164  bool
165  IsTypeComplete ();
166 
167  bool
168  GetDescription (lldb::SBStream &description,
169  lldb::DescriptionLevel description_level);
170 
171  lldb::SBType &
172  operator = (const lldb::SBType &rhs);
173 
174  bool
176 
177  bool
179 
180 protected:
181 
182  lldb_private::TypeImpl &
183  ref ();
184 
185  const lldb_private::TypeImpl &
186  ref () const;
187 
188  lldb::TypeImplSP
189  GetSP ();
190 
191  void
192  SetSP (const lldb::TypeImplSP &type_impl_sp);
193 
194  lldb::TypeImplSP m_opaque_sp;
195 
196  friend class SBFunction;
197  friend class SBModule;
198  friend class SBTarget;
199  friend class SBTypeNameSpecifier;
200  friend class SBTypeMember;
201  friend class SBTypeList;
202  friend class SBValue;
203 
204  SBType (const lldb_private::ClangASTType &);
205  SBType (const lldb::TypeSP &);
206  SBType (const lldb::TypeImplSP &);
207 
208 };
209 
211 {
212 public:
213  SBTypeList();
214 
215  SBTypeList(const lldb::SBTypeList& rhs);
216 
217  ~SBTypeList();
218 
220  operator = (const lldb::SBTypeList& rhs);
221 
222  bool
223  IsValid();
224 
225  void
226  Append (lldb::SBType type);
227 
229  GetTypeAtIndex (uint32_t index);
230 
231  uint32_t
232  GetSize();
233 
234 
235 private:
236  std::unique_ptr<lldb_private::TypeListImpl> m_opaque_ap;
237  friend class SBModule;
238  friend class SBCompileUnit;
239 };
240 
241 
242 } // namespace lldb
243 
244 #endif // LLDB_SBType_h_