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