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 
15 namespace lldb {
17 public:
19 
21 
23 
25 
26  explicit operator bool() const;
27 
28  bool IsValid();
29 
30  lldb::LanguageType GetLanguage();
31 
32  lldb::TypeSummaryCapping GetCapping();
33 
34  void SetLanguage(lldb::LanguageType);
35 
36  void SetCapping(lldb::TypeSummaryCapping);
37 
38 protected:
39  friend class SBValue;
40 
42 
43  const lldb_private::TypeSummaryOptions *operator->() const;
44 
46 
48 
49  const lldb_private::TypeSummaryOptions &ref() const;
50 
51 private:
52  std::unique_ptr<lldb_private::TypeSummaryOptions> m_opaque_up;
53 };
54 
56 public:
57  SBTypeSummary();
58 
59  // Native function summary formatter callback
61 
62  static SBTypeSummary
63  CreateWithSummaryString(const char *data,
64  uint32_t options = 0); // see lldb::eTypeOption values
65 
66  static SBTypeSummary
67  CreateWithFunctionName(const char *data,
68  uint32_t options = 0); // see lldb::eTypeOption values
69 
70  static SBTypeSummary
71  CreateWithScriptCode(const char *data,
72  uint32_t options = 0); // see lldb::eTypeOption values
73 
75  uint32_t options = 0,
76  const char *description = nullptr);
77 
79 
81 
82  explicit operator bool() const;
83 
84  bool IsValid() const;
85 
86  bool IsFunctionCode();
87 
88  bool IsFunctionName();
89 
90  bool IsSummaryString();
91 
92  const char *GetData();
93 
94  void SetSummaryString(const char *data);
95 
96  void SetFunctionName(const char *data);
97 
98  void SetFunctionCode(const char *data);
99 
101 
102  void SetOptions(uint32_t);
103 
104  bool GetDescription(lldb::SBStream &description,
105  lldb::DescriptionLevel description_level);
106 
108 
109  bool DoesPrintValue(lldb::SBValue value);
110 
111  bool IsEqualTo(lldb::SBTypeSummary &rhs);
112 
113  bool operator==(lldb::SBTypeSummary &rhs);
114 
115  bool operator!=(lldb::SBTypeSummary &rhs);
116 
117 protected:
118  friend class SBDebugger;
119  friend class SBTypeCategory;
120  friend class SBValue;
121 
122  lldb::TypeSummaryImplSP GetSP();
123 
124  void SetSP(const lldb::TypeSummaryImplSP &typefilter_impl_sp);
125 
126  lldb::TypeSummaryImplSP m_opaque_sp;
127 
128  SBTypeSummary(const lldb::TypeSummaryImplSP &);
129 
130  bool CopyOnWrite_Impl();
131 
132  bool ChangeSummaryType(bool want_script);
133 };
134 
135 } // namespace lldb
136 
137 #endif // LLDB_API_SBTYPESUMMARY_H
lldb::SBTypeSummary::GetSP
lldb::TypeSummaryImplSP GetSP()
Definition: SBTypeSummary.cpp:371
lldb::SBTypeSummary::CreateWithSummaryString
static SBTypeSummary CreateWithSummaryString(const char *data, uint32_t options=0)
Definition: SBTypeSummary.cpp:105
lldb::SBTypeSummary::SetSP
void SetSP(const lldb::TypeSummaryImplSP &typefilter_impl_sp)
Definition: SBTypeSummary.cpp:373
lldb::SBTypeSummary::IsSummaryString
bool IsSummaryString()
Definition: SBTypeSummary.cpp:206
lldb::SBTypeSummary::FormatCallback
bool(* FormatCallback)(SBValue, SBTypeSummaryOptions, SBStream &)
Definition: SBTypeSummary.h:60
SBDefines.h
lldb::SBTypeSummary::GetOptions
uint32_t GetOptions()
Definition: SBTypeSummary.cpp:233
lldb::SBTypeSummary::GetDescription
bool GetDescription(lldb::SBStream &description, lldb::DescriptionLevel description_level)
Definition: SBTypeSummary.cpp:285
lldb::SBTypeSummary::CreateWithCallback
static SBTypeSummary CreateWithCallback(FormatCallback cb, uint32_t options=0, const char *description=nullptr)
Definition: SBTypeSummary.cpp:138
lldb::SBValue
Definition: SBValue.h:21
lldb::SBTypeSummary::SetOptions
void SetOptions(uint32_t)
Definition: SBTypeSummary.cpp:241
lldb::SBTypeSummary::SBValue
friend class SBValue
Definition: SBTypeSummary.h:120
lldb::LanguageType
LanguageType
Programming language type.
Definition: lldb-enumerations.h:436
lldb::SBTypeSummary::IsEqualTo
bool IsEqualTo(lldb::SBTypeSummary &rhs)
Definition: SBTypeSummary.cpp:323
lldb::SBTypeSummary::CreateWithScriptCode
static SBTypeSummary CreateWithScriptCode(const char *data, uint32_t options=0)
Definition: SBTypeSummary.cpp:127
lldb::SBTypeSummary
Definition: SBTypeSummary.h:55
lldb::SBTypeSummary::operator==
bool operator==(lldb::SBTypeSummary &rhs)
Definition: SBTypeSummary.cpp:315
lldb::SBTypeSummary::~SBTypeSummary
~SBTypeSummary()
lldb::SBTypeSummary::operator=
lldb::SBTypeSummary & operator=(const lldb::SBTypeSummary &rhs)
Definition: SBTypeSummary.cpp:306
lldb::SBTypeSummary::GetData
const char * GetData()
Definition: SBTypeSummary.cpp:215
lldb::SBDebugger
Definition: SBDebugger.h:34
lldb::SBTypeSummary::CreateWithFunctionName
static SBTypeSummary CreateWithFunctionName(const char *data, uint32_t options=0)
Definition: SBTypeSummary.cpp:116
lldb::TypeSummaryCapping
TypeSummaryCapping
Whether a summary should cap how much data it returns to users or not.
Definition: lldb-enumerations.h:1135
lldb::SBTypeSummary::SetSummaryString
void SetSummaryString(const char *data)
Definition: SBTypeSummary.cpp:249
lldb::SBTypeSummary::operator!=
bool operator!=(lldb::SBTypeSummary &rhs)
Definition: SBTypeSummary.cpp:363
lldb::SBTypeSummary::SetFunctionCode
void SetFunctionCode(const char *data)
Definition: SBTypeSummary.cpp:273
lldb::SBTypeSummary::IsValid
bool IsValid() const
Definition: SBTypeSummary.cpp:170
lldb::SBTypeSummaryOptions::m_opaque_up
std::unique_ptr< lldb_private::TypeSummaryOptions > m_opaque_up
Definition: SBTypeSummary.h:52
lldb::SBTypeSummaryOptions
class LLDB_API SBTypeSummaryOptions
Definition: SBDefines.h:101
lldb::SBTypeSummary::DoesPrintValue
bool DoesPrintValue(lldb::SBValue value)
Definition: SBTypeSummary.cpp:297
lldb::SBTypeSummary::SBTypeSummary
SBTypeSummary()
Definition: SBTypeSummary.cpp:103
uint32_t
lldb::SBTypeSummary::IsFunctionName
bool IsFunctionName()
Definition: SBTypeSummary.cpp:193
lldb::SBTypeSummary::m_opaque_sp
lldb::TypeSummaryImplSP m_opaque_sp
Definition: SBTypeSummary.h:126
lldb::SBTypeSummary::SetFunctionName
void SetFunctionName(const char *data)
Definition: SBTypeSummary.cpp:261
lldb_private::TypeSummaryOptions
Definition: TypeSummary.h:26
lldb::SBTypeSummaryOptions
Definition: SBTypeSummary.h:16
lldb::SBTypeSummary::IsFunctionCode
bool IsFunctionCode()
Definition: SBTypeSummary.cpp:180
lldb::SBStream
Definition: SBStream.h:18
lldb::SBTypeSummary::ChangeSummaryType
bool ChangeSummaryType(bool want_script)
Definition: SBTypeSummary.cpp:410
lldb::SBTypeSummary::CopyOnWrite_Impl
bool CopyOnWrite_Impl()
Definition: SBTypeSummary.cpp:380
lldb::SBTypeCategory
Definition: SBTypeCategory.h:17
lldb
Definition: SBAddress.h:15
lldb::DescriptionLevel
DescriptionLevel
Description levels for "void GetDescription(Stream *, DescriptionLevel)" calls.
Definition: lldb-enumerations.h:207
LLDB_API
#define LLDB_API
Definition: SBDefines.h:26