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 18 namespace lldb { 19 20 class LLDB_API SBQueue 21 { 22 public: 23 SBQueue (); 24 25 SBQueue (const QueueSP& queue_sp); 26 27 SBQueue (const SBQueue& rhs); 28 29 const SBQueue & 30 operator= (const lldb::SBQueue& rhs); 31 32 ~SBQueue(); 33 34 bool 35 IsValid() const; 36 37 void 38 Clear (); 39 40 lldb::SBProcess 41 GetProcess (); 42 43 lldb::queue_id_t 44 GetQueueID () const; 45 46 const char * 47 GetName () const; 48 49 uint32_t 50 GetIndexID () const; 51 52 uint32_t 53 GetNumThreads (); 54 55 lldb::SBThread 56 GetThreadAtIndex (uint32_t); 57 58 uint32_t 59 GetNumPendingItems (); 60 61 lldb::SBQueueItem 62 GetPendingItemAtIndex (uint32_t); 63 64 uint32_t 65 GetNumRunningItems (); 66 67 lldb::QueueKind 68 GetKind (); 69 70 protected: 71 friend class SBProcess; 72 friend class SBThread; 73 74 void 75 SetQueue (const lldb::QueueSP& queue_sp); 76 77 void 78 FetchThreads (); 79 80 void 81 FetchItems (); 82 83 private: 84 std::shared_ptr<lldb_private::QueueImpl> m_opaque_sp; 85 }; 86 87 } // namespace lldb 88 89 #endif // LLDB_SBQueue_h_ 90