SBDeclaration.h 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  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. #ifndef LLDB_API_SBDECLARATION_H
  10. #define LLDB_API_SBDECLARATION_H
  11. #include "lldb/API/SBDefines.h"
  12. #include "lldb/API/SBFileSpec.h"
  13. namespace lldb {
  14. class LLDB_API SBDeclaration {
  15. public:
  16. SBDeclaration();
  17. SBDeclaration(const lldb::SBDeclaration &rhs);
  18. ~SBDeclaration();
  19. const lldb::SBDeclaration &operator=(const lldb::SBDeclaration &rhs);
  20. explicit operator bool() const;
  21. bool IsValid() const;
  22. lldb::SBFileSpec GetFileSpec() const;
  23. uint32_t GetLine() const;
  24. uint32_t GetColumn() const;
  25. void SetFileSpec(lldb::SBFileSpec filespec);
  26. void SetLine(uint32_t line);
  27. void SetColumn(uint32_t column);
  28. bool operator==(const lldb::SBDeclaration &rhs) const;
  29. bool operator!=(const lldb::SBDeclaration &rhs) const;
  30. bool GetDescription(lldb::SBStream &description);
  31. protected:
  32. lldb_private::Declaration *get();
  33. private:
  34. friend class SBValue;
  35. const lldb_private::Declaration *operator->() const;
  36. lldb_private::Declaration &ref();
  37. const lldb_private::Declaration &ref() const;
  38. SBDeclaration(const lldb_private::Declaration *lldb_object_ptr);
  39. void SetDeclaration(const lldb_private::Declaration &lldb_object_ref);
  40. std::unique_ptr<lldb_private::Declaration> m_opaque_up;
  41. };
  42. } // namespace lldb
  43. #endif // LLDB_API_SBDECLARATION_H