LLDB mainline
SBTypeSummary.h
Go to the documentation of this file.
1//===-- SBTypeSummary.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_API_SBTYPESUMMARY_H
11#define LLDB_API_SBTYPESUMMARY_H
12
13#include "lldb/API/SBDefines.h"
14
15namespace lldb {
17public:
19
21
22#ifndef SWIG
24#endif
25
27
28 explicit operator bool() const;
29
30 bool IsValid();
31
32 lldb::LanguageType GetLanguage();
33
34 lldb::TypeSummaryCapping GetCapping();
35
36 void SetLanguage(lldb::LanguageType);
37
38 void SetCapping(lldb::TypeSummaryCapping);
39
40protected:
41 friend class SBValue;
42
44
45 const lldb_private::TypeSummaryOptions *operator->() const;
46
48
50
51 const lldb_private::TypeSummaryOptions &ref() const;
52
53private:
54 std::unique_ptr<lldb_private::TypeSummaryOptions> m_opaque_up;
55};
56
58public:
60
61 // Native function summary formatter callback
63
64 static SBTypeSummary
65 CreateWithSummaryString(const char *data,
66 uint32_t options = 0); // see lldb::eTypeOption values
67
68 static SBTypeSummary
69 CreateWithFunctionName(const char *data,
70 uint32_t options = 0); // see lldb::eTypeOption values
71
72 static SBTypeSummary
73 CreateWithScriptCode(const char *data,
74 uint32_t options = 0); // see lldb::eTypeOption values
75
76#ifndef SWIG
78 uint32_t options = 0,
79 const char *description = nullptr);
80#endif
81
83
85
86 explicit operator bool() const;
87
88 bool IsValid() const;
89
90 bool IsFunctionCode();
91
92 bool IsFunctionName();
93
94 bool IsSummaryString();
95
96 const char *GetData();
97
98 void SetSummaryString(const char *data);
99
100 void SetFunctionName(const char *data);
101
102 void SetFunctionCode(const char *data);
103
105
106 void SetOptions(uint32_t);
107
108 bool GetDescription(lldb::SBStream &description,
109 lldb::DescriptionLevel description_level);
110
112
113 bool DoesPrintValue(lldb::SBValue value);
114
116
118
120
121protected:
122 friend class SBDebugger;
123 friend class SBTypeCategory;
124 friend class SBValue;
125
126 lldb::TypeSummaryImplSP GetSP();
127
128 void SetSP(const lldb::TypeSummaryImplSP &typefilter_impl_sp);
129
130 lldb::TypeSummaryImplSP m_opaque_sp;
131
132 SBTypeSummary(const lldb::TypeSummaryImplSP &);
133
134 bool CopyOnWrite_Impl();
135
136 bool ChangeSummaryType(bool want_script);
137};
138
139} // namespace lldb
140
141#endif // LLDB_API_SBTYPESUMMARY_H
#define LLDB_API
Definition: SBDefines.h:26
std::unique_ptr< lldb_private::TypeSummaryOptions > m_opaque_up
Definition: SBTypeSummary.h:54
static SBTypeSummary CreateWithFunctionName(const char *data, uint32_t options=0)
void SetSummaryString(const char *data)
void SetOptions(uint32_t)
lldb::SBTypeSummary & operator=(const lldb::SBTypeSummary &rhs)
static SBTypeSummary CreateWithCallback(FormatCallback cb, uint32_t options=0, const char *description=nullptr)
static SBTypeSummary CreateWithSummaryString(const char *data, uint32_t options=0)
bool operator==(lldb::SBTypeSummary &rhs)
bool ChangeSummaryType(bool want_script)
friend class SBValue
void SetSP(const lldb::TypeSummaryImplSP &typefilter_impl_sp)
bool(* FormatCallback)(SBValue, SBTypeSummaryOptions, SBStream &)
Definition: SBTypeSummary.h:62
void SetFunctionCode(const char *data)
static SBTypeSummary CreateWithScriptCode(const char *data, uint32_t options=0)
bool operator!=(lldb::SBTypeSummary &rhs)
bool IsEqualTo(lldb::SBTypeSummary &rhs)
lldb::TypeSummaryImplSP m_opaque_sp
const char * GetData()
bool DoesPrintValue(lldb::SBValue value)
void SetFunctionName(const char *data)
bool GetDescription(lldb::SBStream &description, lldb::DescriptionLevel description_level)
lldb::TypeSummaryImplSP GetSP()
Definition: SBAddress.h:15
TypeSummaryCapping
Whether a summary should cap how much data it returns to users or not.
DescriptionLevel
Description levels for "void GetDescription(Stream *, DescriptionLevel)" calls.
LanguageType
Programming language type.