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  void SetOptions(const lldb_private::TypeSummaryOptions *lldb_object_ptr);
52 
53 private:
54  std::unique_ptr<lldb_private::TypeSummaryOptions> m_opaque_up;
55 };
56 
58 public:
59  SBTypeSummary();
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 
77  uint32_t options = 0,
78  const char *description = nullptr);
79 
81 
83 
84  explicit operator bool() const;
85 
86  bool IsValid() const;
87 
88  bool IsFunctionCode();
89 
90  bool IsFunctionName();
91 
92  bool IsSummaryString();
93 
94  const char *GetData();
95 
96  void SetSummaryString(const char *data);
97 
98  void SetFunctionName(const char *data);
99 
100  void SetFunctionCode(const char *data);
101 
103 
104  void SetOptions(uint32_t);
105 
106  bool GetDescription(lldb::SBStream &description,
107  lldb::DescriptionLevel description_level);
108 
110 
111  bool DoesPrintValue(lldb::SBValue value);
112 
113  bool IsEqualTo(lldb::SBTypeSummary &rhs);
114 
115  bool operator==(lldb::SBTypeSummary &rhs);
116 
117  bool operator!=(lldb::SBTypeSummary &rhs);
118 
119 protected:
120  friend class SBDebugger;
121  friend class SBTypeCategory;
122  friend class SBValue;
123 
124  lldb::TypeSummaryImplSP GetSP();
125 
126  void SetSP(const lldb::TypeSummaryImplSP &typefilter_impl_sp);
127 
128  lldb::TypeSummaryImplSP m_opaque_sp;
129 
130  SBTypeSummary(const lldb::TypeSummaryImplSP &);
131 
132  bool CopyOnWrite_Impl();
133 
134  bool ChangeSummaryType(bool want_script);
135 };
136 
137 } // namespace lldb
138 
139 #endif // LLDB_API_SBTYPESUMMARY_H
lldb::SBTypeSummary::GetSP
lldb::TypeSummaryImplSP GetSP()
Definition: SBTypeSummary.cpp:409
lldb::SBTypeSummary::CreateWithSummaryString
static SBTypeSummary CreateWithSummaryString(const char *data, uint32_t options=0)
Definition: SBTypeSummary.cpp:123
lldb::SBTypeSummary::SetSP
void SetSP(const lldb::TypeSummaryImplSP &typefilter_impl_sp)
Definition: SBTypeSummary.cpp:411
lldb::SBTypeSummary::IsSummaryString
bool IsSummaryString()
Definition: SBTypeSummary.cpp:233
lldb::SBTypeSummary::FormatCallback
bool(* FormatCallback)(SBValue, SBTypeSummaryOptions, SBStream &)
Definition: SBTypeSummary.h:62
SBDefines.h
lldb::SBTypeSummary::GetOptions
uint32_t GetOptions()
Definition: SBTypeSummary.cpp:260
lldb::SBTypeSummary::GetDescription
bool GetDescription(lldb::SBStream &description, lldb::DescriptionLevel description_level)
Definition: SBTypeSummary.cpp:315
lldb::SBTypeSummary::CreateWithCallback
static SBTypeSummary CreateWithCallback(FormatCallback cb, uint32_t options=0, const char *description=nullptr)
Definition: SBTypeSummary.cpp:162
lldb::SBValue
Definition: SBValue.h:21
lldb::SBTypeSummary::SetOptions
void SetOptions(uint32_t)
Definition: SBTypeSummary.cpp:268
lldb::SBTypeSummary::SBValue
friend class SBValue
Definition: SBTypeSummary.h:122
lldb::LanguageType
LanguageType
Programming language type.
Definition: lldb-enumerations.h:436
LLDB_API
#define LLDB_API
Definition: lldb-defines.h:23
lldb::SBTypeSummary::IsEqualTo
bool IsEqualTo(lldb::SBTypeSummary &rhs)
Definition: SBTypeSummary.cpp:359
lldb::SBTypeSummary::CreateWithScriptCode
static SBTypeSummary CreateWithScriptCode(const char *data, uint32_t options=0)
Definition: SBTypeSummary.cpp:149
lldb::SBTypeSummary
Definition: SBTypeSummary.h:57
lldb::SBTypeSummary::operator==
bool operator==(lldb::SBTypeSummary &rhs)
Definition: SBTypeSummary.cpp:350
lldb::SBTypeSummary::~SBTypeSummary
~SBTypeSummary()
lldb::SBTypeSummary::operator=
lldb::SBTypeSummary & operator=(const lldb::SBTypeSummary &rhs)
Definition: SBTypeSummary.cpp:339
lldb::SBTypeSummary::GetData
const char * GetData()
Definition: SBTypeSummary.cpp:242
lldb::SBDebugger
Definition: SBDebugger.h:34
lldb::SBTypeSummary::CreateWithFunctionName
static SBTypeSummary CreateWithFunctionName(const char *data, uint32_t options=0)
Definition: SBTypeSummary.cpp:136
lldb::TypeSummaryCapping
TypeSummaryCapping
Whether a summary should cap how much data it returns to users or not.
Definition: lldb-enumerations.h:1116
lldb::SBTypeSummary::SetSummaryString
void SetSummaryString(const char *data)
Definition: SBTypeSummary.cpp:276
lldb::SBTypeSummary::operator!=
bool operator!=(lldb::SBTypeSummary &rhs)
Definition: SBTypeSummary.cpp:400
lldb::SBTypeSummary::SetFunctionCode
void SetFunctionCode(const char *data)
Definition: SBTypeSummary.cpp:302
lldb::SBTypeSummary::IsValid
bool IsValid() const
Definition: SBTypeSummary.cpp:197
lldb::SBTypeSummaryOptions::m_opaque_up
std::unique_ptr< lldb_private::TypeSummaryOptions > m_opaque_up
Definition: SBTypeSummary.h:54
lldb::SBTypeSummaryOptions
class LLDB_API SBTypeSummaryOptions
Definition: SBDefines.h:88
lldb::SBTypeSummary::DoesPrintValue
bool DoesPrintValue(lldb::SBValue value)
Definition: SBTypeSummary.cpp:329
lldb::SBTypeSummary::SBTypeSummary
SBTypeSummary()
Definition: SBTypeSummary.cpp:119
uint32_t
lldb::SBTypeSummary::IsFunctionName
bool IsFunctionName()
Definition: SBTypeSummary.cpp:220
lldb::SBTypeSummary::m_opaque_sp
lldb::TypeSummaryImplSP m_opaque_sp
Definition: SBTypeSummary.h:128
lldb::SBTypeSummary::SetFunctionName
void SetFunctionName(const char *data)
Definition: SBTypeSummary.cpp:289
lldb_private::TypeSummaryOptions
Definition: TypeSummary.h:26
lldb::SBTypeSummaryOptions
Definition: SBTypeSummary.h:16
lldb::SBTypeSummary::IsFunctionCode
bool IsFunctionCode()
Definition: SBTypeSummary.cpp:207
lldb::SBStream
Definition: SBStream.h:18
lldb::SBTypeSummary::ChangeSummaryType
bool ChangeSummaryType(bool want_script)
Definition: SBTypeSummary.cpp:448
lldb::SBTypeSummary::CopyOnWrite_Impl
bool CopyOnWrite_Impl()
Definition: SBTypeSummary.cpp:418
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