xref: /trueos/contrib/llvm/tools/lldb/include/lldb/API/SBQueue.h (revision fa88ea9f26d1e5430901a9ca6c47daebcc5af5de)
1 //===-- SBQueue.h -----------------------------------------------*- C++ -*-===//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 
10 #ifndef LLDB_SBQueue_h_
11 #define LLDB_SBQueue_h_
12 
13 #include <vector>
14 
15 #include "lldb/lldb-forward.h"
16 #include "lldb/API/SBDefines.h"
17 #include "lldb/API/SBQueueItem.h"
18 
19 namespace lldb {
20 
21 class SBQueue
22 {
23 public:
24     SBQueue ();
25 
26     SBQueue (const QueueSP& queue_sp);
27 
28     SBQueue (const SBQueue& rhs);
29 
30     const SBQueue &
31     operator= (const lldb::SBQueue& rhs);
32 
33    ~SBQueue();
34 
35     bool
36     IsValid() const;
37 
38     void
39     Clear ();
40 
41     lldb::SBProcess
42     GetProcess ();
43 
44     lldb::queue_id_t
45     GetQueueID () const;
46 
47     const char *
48     GetName () const;
49 
50     uint32_t
51     GetIndexID () const;
52 
53     uint32_t
54     GetNumThreads ();
55 
56     lldb::SBThread
57     GetThreadAtIndex (uint32_t);
58 
59     uint32_t
60     GetNumPendingItems ();
61 
62     lldb::SBQueueItem
63     GetPendingItemAtIndex (uint32_t);
64 
65 protected:
66     friend class SBProcess;
67 
68     void
69     SetQueue (const lldb::QueueSP& queue_sp);
70 
71     void
72     FetchThreads ();
73 
74     void
75     FetchItems ();
76 
77 private:
78     std::shared_ptr<lldb_private::QueueImpl> m_opaque_sp;
79 };
80 
81 } // namespace lldb
82 
83 #endif  // LLDB_SBQueue_h_
84