SBQueue.h 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. //===-- SBQueue.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. #ifndef LLDB_API_SBQUEUE_H
  9. #define LLDB_API_SBQUEUE_H
  10. #include <vector>
  11. #include "lldb/API/SBDefines.h"
  12. #include "lldb/lldb-forward.h"
  13. namespace lldb {
  14. class LLDB_API SBQueue {
  15. public:
  16. SBQueue();
  17. SBQueue(const QueueSP &queue_sp);
  18. SBQueue(const SBQueue &rhs);
  19. const SBQueue &operator=(const lldb::SBQueue &rhs);
  20. ~SBQueue();
  21. explicit operator bool() const;
  22. bool IsValid() const;
  23. void Clear();
  24. lldb::SBProcess GetProcess();
  25. lldb::queue_id_t GetQueueID() const;
  26. const char *GetName() const;
  27. uint32_t GetIndexID() const;
  28. uint32_t GetNumThreads();
  29. lldb::SBThread GetThreadAtIndex(uint32_t);
  30. uint32_t GetNumPendingItems();
  31. lldb::SBQueueItem GetPendingItemAtIndex(uint32_t);
  32. uint32_t GetNumRunningItems();
  33. lldb::QueueKind GetKind();
  34. protected:
  35. friend class SBProcess;
  36. friend class SBThread;
  37. void SetQueue(const lldb::QueueSP &queue_sp);
  38. private:
  39. std::shared_ptr<lldb_private::QueueImpl> m_opaque_sp;
  40. };
  41. } // namespace lldb
  42. #endif // LLDB_API_SBQUEUE_H