1 //===-- SBThreadCollection.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_SBThreadCollection_h_ 11 #define LLDB_SBThreadCollection_h_ 12 13 #include "lldb/API/SBDefines.h" 14 15 namespace lldb { 16 17 class LLDB_API SBThreadCollection { 18 public: 19 SBThreadCollection(); 20 21 SBThreadCollection(const SBThreadCollection &rhs); 22 23 const SBThreadCollection &operator=(const SBThreadCollection &rhs); 24 25 ~SBThreadCollection(); 26 27 bool IsValid() const; 28 29 size_t GetSize(); 30 31 lldb::SBThread GetThreadAtIndex(size_t idx); 32 33 protected: 34 // Mimic shared pointer... 35 lldb_private::ThreadCollection *get() const; 36 37 lldb_private::ThreadCollection *operator->() const; 38 39 lldb::ThreadCollectionSP &operator*(); 40 41 const lldb::ThreadCollectionSP &operator*() const; 42 43 SBThreadCollection(const lldb::ThreadCollectionSP &threads); 44 45 void SetOpaque(const lldb::ThreadCollectionSP &threads); 46 47 private: 48 friend class SBProcess; 49 friend class SBThread; 50 51 lldb::ThreadCollectionSP m_opaque_sp; 52 }; 53 54 } // namespace lldb 55 56 #endif // LLDB_SBThreadCollection_h_ 57