]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - contrib/llvm/tools/lldb/include/lldb/API/SBTypeCategory.h
Merge llvm, clang, compiler-rt, libc++, libunwind, lld, lldb and openmp
[FreeBSD/FreeBSD.git] / contrib / llvm / tools / lldb / include / lldb / API / SBTypeCategory.h
1 //===-- SBTypeCategory.h --------------------------------------------*- C++
2 //-*-===//
3 //
4 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
5 // See https://llvm.org/LICENSE.txt for license information.
6 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
7 //
8 //===----------------------------------------------------------------------===//
9
10 #ifndef LLDB_SBTypeCategory_h_
11 #define LLDB_SBTypeCategory_h_
12
13 #include "lldb/API/SBDefines.h"
14
15 namespace lldb {
16
17 class LLDB_API SBTypeCategory {
18 public:
19   SBTypeCategory();
20
21   SBTypeCategory(const lldb::SBTypeCategory &rhs);
22
23   ~SBTypeCategory();
24
25   explicit operator bool() const;
26
27   bool IsValid() const;
28
29   bool GetEnabled();
30
31   void SetEnabled(bool);
32
33   const char *GetName();
34
35   lldb::LanguageType GetLanguageAtIndex(uint32_t idx);
36
37   uint32_t GetNumLanguages();
38
39   void AddLanguage(lldb::LanguageType language);
40
41   bool GetDescription(lldb::SBStream &description,
42                       lldb::DescriptionLevel description_level);
43
44   uint32_t GetNumFormats();
45
46   uint32_t GetNumSummaries();
47
48   uint32_t GetNumFilters();
49
50   uint32_t GetNumSynthetics();
51
52   SBTypeNameSpecifier GetTypeNameSpecifierForFilterAtIndex(uint32_t);
53
54   SBTypeNameSpecifier GetTypeNameSpecifierForFormatAtIndex(uint32_t);
55
56   SBTypeNameSpecifier GetTypeNameSpecifierForSummaryAtIndex(uint32_t);
57
58   SBTypeNameSpecifier GetTypeNameSpecifierForSyntheticAtIndex(uint32_t);
59
60   SBTypeFilter GetFilterForType(SBTypeNameSpecifier);
61
62   SBTypeFormat GetFormatForType(SBTypeNameSpecifier);
63
64   SBTypeSummary GetSummaryForType(SBTypeNameSpecifier);
65
66   SBTypeSynthetic GetSyntheticForType(SBTypeNameSpecifier);
67
68   SBTypeFilter GetFilterAtIndex(uint32_t);
69
70   SBTypeFormat GetFormatAtIndex(uint32_t);
71
72   SBTypeSummary GetSummaryAtIndex(uint32_t);
73
74   SBTypeSynthetic GetSyntheticAtIndex(uint32_t);
75
76   bool AddTypeFormat(SBTypeNameSpecifier, SBTypeFormat);
77
78   bool DeleteTypeFormat(SBTypeNameSpecifier);
79
80   bool AddTypeSummary(SBTypeNameSpecifier, SBTypeSummary);
81
82   bool DeleteTypeSummary(SBTypeNameSpecifier);
83
84   bool AddTypeFilter(SBTypeNameSpecifier, SBTypeFilter);
85
86   bool DeleteTypeFilter(SBTypeNameSpecifier);
87
88   bool AddTypeSynthetic(SBTypeNameSpecifier, SBTypeSynthetic);
89
90   bool DeleteTypeSynthetic(SBTypeNameSpecifier);
91
92   lldb::SBTypeCategory &operator=(const lldb::SBTypeCategory &rhs);
93
94   bool operator==(lldb::SBTypeCategory &rhs);
95
96   bool operator!=(lldb::SBTypeCategory &rhs);
97
98 protected:
99   friend class SBDebugger;
100
101   lldb::TypeCategoryImplSP GetSP();
102
103   void SetSP(const lldb::TypeCategoryImplSP &typecategory_impl_sp);
104
105   TypeCategoryImplSP m_opaque_sp;
106
107   SBTypeCategory(const lldb::TypeCategoryImplSP &);
108
109   SBTypeCategory(const char *);
110
111   bool IsDefaultCategory();
112 };
113
114 } // namespace lldb
115
116 #endif // LLDB_SBTypeCategory_h_