Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-05-10 08:42:43

0001 //===-- SBTypeSummary.h -------------------------------------------*- C++
0002 //-*-===//
0003 //
0004 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
0005 // See https://llvm.org/LICENSE.txt for license information.
0006 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
0007 //
0008 //===----------------------------------------------------------------------===//
0009 
0010 #ifndef LLDB_API_SBTYPESUMMARY_H
0011 #define LLDB_API_SBTYPESUMMARY_H
0012 
0013 #include "lldb/API/SBDefines.h"
0014 
0015 namespace lldb_private {
0016 namespace python {
0017 class SWIGBridge;
0018 }
0019 } // namespace lldb_private
0020 
0021 namespace lldb {
0022 class LLDB_API SBTypeSummaryOptions {
0023 public:
0024   SBTypeSummaryOptions();
0025 
0026   SBTypeSummaryOptions(const lldb::SBTypeSummaryOptions &rhs);
0027 
0028 
0029   ~SBTypeSummaryOptions();
0030 
0031   explicit operator bool() const;
0032 
0033   bool IsValid();
0034 
0035   lldb::LanguageType GetLanguage();
0036 
0037   lldb::TypeSummaryCapping GetCapping();
0038 
0039   void SetLanguage(lldb::LanguageType);
0040 
0041   void SetCapping(lldb::TypeSummaryCapping);
0042 
0043 protected:
0044   friend class SBValue;
0045   friend class SBTypeSummary;
0046 
0047   friend class lldb_private::python::SWIGBridge;
0048 
0049   SBTypeSummaryOptions(const lldb_private::TypeSummaryOptions &lldb_object);
0050 
0051   lldb_private::TypeSummaryOptions *operator->();
0052 
0053   const lldb_private::TypeSummaryOptions *operator->() const;
0054 
0055   lldb_private::TypeSummaryOptions *get();
0056 
0057   lldb_private::TypeSummaryOptions &ref();
0058 
0059   const lldb_private::TypeSummaryOptions &ref() const;
0060 
0061 private:
0062   std::unique_ptr<lldb_private::TypeSummaryOptions> m_opaque_up;
0063 };
0064 
0065 class SBTypeSummary {
0066 public:
0067   SBTypeSummary();
0068 
0069   // Native function summary formatter callback
0070   typedef bool (*FormatCallback)(SBValue, SBTypeSummaryOptions, SBStream &);
0071 
0072   static SBTypeSummary
0073   CreateWithSummaryString(const char *data,
0074                           uint32_t options = 0); // see lldb::eTypeOption values
0075 
0076   static SBTypeSummary
0077   CreateWithFunctionName(const char *data,
0078                          uint32_t options = 0); // see lldb::eTypeOption values
0079 
0080   static SBTypeSummary
0081   CreateWithScriptCode(const char *data,
0082                        uint32_t options = 0); // see lldb::eTypeOption values
0083 
0084 #ifndef SWIG
0085   static SBTypeSummary CreateWithCallback(FormatCallback cb,
0086                                           uint32_t options = 0,
0087                                           const char *description = nullptr);
0088 #endif
0089 
0090   SBTypeSummary(const lldb::SBTypeSummary &rhs);
0091 
0092   ~SBTypeSummary();
0093 
0094   explicit operator bool() const;
0095 
0096   bool IsValid() const;
0097 
0098   bool IsFunctionCode();
0099 
0100   bool IsFunctionName();
0101 
0102   bool IsSummaryString();
0103 
0104   const char *GetData();
0105 
0106   void SetSummaryString(const char *data);
0107 
0108   void SetFunctionName(const char *data);
0109 
0110   void SetFunctionCode(const char *data);
0111 
0112   uint32_t GetOptions();
0113 
0114   void SetOptions(uint32_t);
0115 
0116   bool GetDescription(lldb::SBStream &description,
0117                       lldb::DescriptionLevel description_level);
0118 
0119   lldb::SBTypeSummary &operator=(const lldb::SBTypeSummary &rhs);
0120 
0121   bool DoesPrintValue(lldb::SBValue value);
0122 
0123   bool IsEqualTo(lldb::SBTypeSummary &rhs);
0124 
0125   bool operator==(lldb::SBTypeSummary &rhs);
0126 
0127   bool operator!=(lldb::SBTypeSummary &rhs);
0128 
0129 protected:
0130   friend class SBDebugger;
0131   friend class SBTypeCategory;
0132   friend class SBValue;
0133 
0134   lldb::TypeSummaryImplSP GetSP();
0135 
0136   void SetSP(const lldb::TypeSummaryImplSP &typefilter_impl_sp);
0137 
0138   lldb::TypeSummaryImplSP m_opaque_sp;
0139 
0140   SBTypeSummary(const lldb::TypeSummaryImplSP &);
0141 
0142   bool CopyOnWrite_Impl();
0143 
0144   bool ChangeSummaryType(bool want_script);
0145 };
0146 
0147 } // namespace lldb
0148 
0149 #endif // LLDB_API_SBTYPESUMMARY_H