1 | //===-- SBDeclaration.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_SBDECLARATION_H |
11 | #define LLDB_API_SBDECLARATION_H |
12 | |
13 | #include "lldb/API/SBDefines.h" |
14 | #include "lldb/API/SBFileSpec.h" |
15 | |
16 | namespace lldb { |
17 | |
18 | class LLDB_API SBDeclaration { |
19 | public: |
20 | SBDeclaration(); |
21 | |
22 | SBDeclaration(const lldb::SBDeclaration &rhs); |
23 | |
24 | ~SBDeclaration(); |
25 | |
26 | const lldb::SBDeclaration &operator=(const lldb::SBDeclaration &rhs); |
27 | |
28 | explicit operator bool() const; |
29 | |
30 | bool IsValid() const; |
31 | |
32 | lldb::SBFileSpec GetFileSpec() const; |
33 | |
34 | uint32_t GetLine() const; |
35 | |
36 | uint32_t GetColumn() const; |
37 | |
38 | void SetFileSpec(lldb::SBFileSpec filespec); |
39 | |
40 | void SetLine(uint32_t line); |
41 | |
42 | void SetColumn(uint32_t column); |
43 | |
44 | bool operator==(const lldb::SBDeclaration &rhs) const; |
45 | |
46 | bool operator!=(const lldb::SBDeclaration &rhs) const; |
47 | |
48 | bool GetDescription(lldb::SBStream &description); |
49 | |
50 | protected: |
51 | lldb_private::Declaration *get(); |
52 | |
53 | private: |
54 | friend class SBValue; |
55 | |
56 | const lldb_private::Declaration *operator->() const; |
57 | |
58 | lldb_private::Declaration &ref(); |
59 | |
60 | const lldb_private::Declaration &ref() const; |
61 | |
62 | SBDeclaration(const lldb_private::Declaration *lldb_object_ptr); |
63 | |
64 | void SetDeclaration(const lldb_private::Declaration &lldb_object_ref); |
65 | |
66 | std::unique_ptr<lldb_private::Declaration> m_opaque_up; |
67 | }; |
68 | |
69 | } // namespace lldb |
70 | |
71 | #endif // LLDB_API_SBDECLARATION_H |
72 | |