1 | //===-- SBScriptObject.h ----------------------------------------*- C++ -*-===// |
2 | // |
3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
4 | // See https://llvm.org/LICENSE.txt for license information. |
5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
6 | // |
7 | //===----------------------------------------------------------------------===// |
8 | |
9 | #ifndef LLDB_API_SBSCRIPTOBJECT_H |
10 | #define LLDB_API_SBSCRIPTOBJECT_H |
11 | |
12 | #include "lldb/API/SBDefines.h" |
13 | |
14 | namespace lldb_private { |
15 | class ScriptObject; |
16 | } |
17 | |
18 | namespace lldb { |
19 | |
20 | class LLDB_API SBScriptObject { |
21 | public: |
22 | SBScriptObject(const ScriptObjectPtr ptr, lldb::ScriptLanguage lang); |
23 | |
24 | SBScriptObject(const lldb::SBScriptObject &rhs); |
25 | |
26 | ~SBScriptObject(); |
27 | |
28 | const lldb::SBScriptObject &operator=(const lldb::SBScriptObject &rhs); |
29 | |
30 | explicit operator bool() const; |
31 | |
32 | bool operator!=(const SBScriptObject &rhs) const; |
33 | |
34 | bool IsValid() const; |
35 | |
36 | lldb::ScriptObjectPtr GetPointer() const; |
37 | |
38 | lldb::ScriptLanguage GetLanguage() const; |
39 | |
40 | protected: |
41 | friend class SBStructuredData; |
42 | |
43 | lldb_private::ScriptObject *get(); |
44 | |
45 | lldb_private::ScriptObject &ref(); |
46 | |
47 | const lldb_private::ScriptObject &ref() const; |
48 | |
49 | private: |
50 | std::unique_ptr<lldb_private::ScriptObject> m_opaque_up; |
51 | }; |
52 | |
53 | } // namespace lldb |
54 | |
55 | #endif // LLDB_API_SBSCRIPTOBJECT_H |
56 | |