blob: 0124c1c90dd270b574129e873e7ed4ae5b7f5b36 [file] [log] [blame]
Andrew Walbran3d2c1972020-04-07 12:24:26 +01001//===-- 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
9#ifndef LLDB_SBQueue_h_
10#define LLDB_SBQueue_h_
11
12#include <vector>
13
14#include "lldb/API/SBDefines.h"
15#include "lldb/lldb-forward.h"
16
17namespace lldb {
18
19class LLDB_API SBQueue {
20public:
21 SBQueue();
22
23 SBQueue(const QueueSP &queue_sp);
24
25 SBQueue(const SBQueue &rhs);
26
27 const SBQueue &operator=(const lldb::SBQueue &rhs);
28
29 ~SBQueue();
30
31 explicit operator bool() const;
32
33 bool IsValid() const;
34
35 void Clear();
36
37 lldb::SBProcess GetProcess();
38
39 lldb::queue_id_t GetQueueID() const;
40
41 const char *GetName() const;
42
43 uint32_t GetIndexID() const;
44
45 uint32_t GetNumThreads();
46
47 lldb::SBThread GetThreadAtIndex(uint32_t);
48
49 uint32_t GetNumPendingItems();
50
51 lldb::SBQueueItem GetPendingItemAtIndex(uint32_t);
52
53 uint32_t GetNumRunningItems();
54
55 lldb::QueueKind GetKind();
56
57protected:
58 friend class SBProcess;
59 friend class SBThread;
60
61 void SetQueue(const lldb::QueueSP &queue_sp);
62
63private:
64 std::shared_ptr<lldb_private::QueueImpl> m_opaque_sp;
65};
66
67} // namespace lldb
68
69#endif // LLDB_SBQueue_h_