1 //===-- SBDeclaration.h -------------------------------------------*- C++
2 //-*-===//
3 //
4 //                     The LLVM Compiler Infrastructure
5 //
6 // This file is distributed under the University of Illinois Open Source
7 // License. See LICENSE.TXT for details.
8 //
9 //===----------------------------------------------------------------------===//
10 
11 #ifndef LLDB_SBDeclaration_h_
12 #define LLDB_SBDeclaration_h_
13 
14 #include "lldb/API/SBDefines.h"
15 #include "lldb/API/SBFileSpec.h"
16 
17 namespace lldb {
18 
19 class LLDB_API SBDeclaration {
20 public:
21   SBDeclaration();
22 
23   SBDeclaration(const lldb::SBDeclaration &rhs);
24 
25   ~SBDeclaration();
26 
27   const lldb::SBDeclaration &operator=(const lldb::SBDeclaration &rhs);
28 
29   bool IsValid() const;
30 
31   lldb::SBFileSpec GetFileSpec() const;
32 
33   uint32_t GetLine() const;
34 
35   uint32_t GetColumn() const;
36 
37   void SetFileSpec(lldb::SBFileSpec filespec);
38 
39   void SetLine(uint32_t line);
40 
41   void SetColumn(uint32_t column);
42 
43   bool operator==(const lldb::SBDeclaration &rhs) const;
44 
45   bool operator!=(const lldb::SBDeclaration &rhs) const;
46 
47   bool GetDescription(lldb::SBStream &description);
48 
49 protected:
50   lldb_private::Declaration *get();
51 
52 private:
53   friend class SBValue;
54 
55   const lldb_private::Declaration *operator->() const;
56 
57   lldb_private::Declaration &ref();
58 
59   const lldb_private::Declaration &ref() const;
60 
61   SBDeclaration(const lldb_private::Declaration *lldb_object_ptr);
62 
63   void SetDeclaration(const lldb_private::Declaration &lldb_object_ref);
64 
65   std::unique_ptr<lldb_private::Declaration> m_opaque_ap;
66 };
67 
68 } // namespace lldb
69 
70 #endif // LLDB_SBDeclaration_h_
71