• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 //===-- SBTypeSynthetic.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_SBTYPESYNTHETIC_H
11 #define LLDB_API_SBTYPESYNTHETIC_H
12 
13 #include "lldb/API/SBDefines.h"
14 
15 namespace lldb {
16 
17 class LLDB_API SBTypeSynthetic {
18 public:
19   SBTypeSynthetic();
20 
21   static SBTypeSynthetic
22   CreateWithClassName(const char *data,
23                       uint32_t options = 0); // see lldb::eTypeOption values
24 
25   static SBTypeSynthetic
26   CreateWithScriptCode(const char *data,
27                        uint32_t options = 0); // see lldb::eTypeOption values
28 
29   SBTypeSynthetic(const lldb::SBTypeSynthetic &rhs);
30 
31   ~SBTypeSynthetic();
32 
33   explicit operator bool() const;
34 
35   bool IsValid() const;
36 
37   bool IsClassCode();
38 
39   bool IsClassName();
40 
41   const char *GetData();
42 
43   void SetClassName(const char *data);
44 
45   void SetClassCode(const char *data);
46 
47   uint32_t GetOptions();
48 
49   void SetOptions(uint32_t);
50 
51   bool GetDescription(lldb::SBStream &description,
52                       lldb::DescriptionLevel description_level);
53 
54   lldb::SBTypeSynthetic &operator=(const lldb::SBTypeSynthetic &rhs);
55 
56   bool IsEqualTo(lldb::SBTypeSynthetic &rhs);
57 
58   bool operator==(lldb::SBTypeSynthetic &rhs);
59 
60   bool operator!=(lldb::SBTypeSynthetic &rhs);
61 
62 protected:
63   friend class SBDebugger;
64   friend class SBTypeCategory;
65   friend class SBValue;
66 
67   lldb::ScriptedSyntheticChildrenSP GetSP();
68 
69   void SetSP(const lldb::ScriptedSyntheticChildrenSP &typefilter_impl_sp);
70 
71   lldb::ScriptedSyntheticChildrenSP m_opaque_sp;
72 
73   SBTypeSynthetic(const lldb::ScriptedSyntheticChildrenSP &);
74 
75   bool CopyOnWrite_Impl();
76 };
77 
78 } // namespace lldb
79 
80 #endif // LLDB_API_SBTYPESYNTHETIC_H
81