9#ifndef LLDB_TARGET_TARGETGROUPLIST_H
10#define LLDB_TARGET_TARGETGROUPLIST_H
31 m_mutex(std::make_shared<std::recursive_mutex>()) {}
34 const std::shared_ptr<std::recursive_mutex> &mutex)
52 template <
typename GroupT,
typename...
Args>
55 static_assert(std::is_base_of_v<TargetGroup, GroupT>,
56 "GroupT must derive from TargetGroup");
57 auto group_sp = std::shared_ptr<GroupT>(
58 new GroupT(*
this, description, std::forward<Args>(args)...));
59 std::lock_guard<std::recursive_mutex> guard(*
m_mutex);
70 std::vector<lldb::TargetGroupSP>
GetGroups()
const;
83 std::shared_ptr<std::recursive_mutex>
m_mutex;
A command line argument class.
std::shared_ptr< GroupT > CreateTargetGroup(llvm::StringRef description, Args &&...args)
Create and register a target group of type GroupT.
lldb::TargetGroupSP CreateTargetGroup(llvm::StringRef description)
Create and register a target group.
bool DeleteTargetGroup(const lldb::TargetGroupSP &group_sp)
Remove group_sp from this list.
void RemoveTarget(const lldb::TargetSP &target_sp)
void Remove(const TargetGroup *group)
TargetGroupList(Debugger &debugger)
TargetGroupList(TargetGroupList &&)=delete
TargetGroupList & operator=(const TargetGroupList &)=delete
void Add(const lldb::TargetGroupSP &group_sp)
TargetGroupList(const TargetGroupList &)=delete
std::shared_ptr< std::recursive_mutex > m_mutex
Shared by the debugger's list, each target's list, and every group.
TargetGroupList(Debugger &debugger, const std::shared_ptr< std::recursive_mutex > &mutex)
std::vector< lldb::TargetGroupSP > GetGroups() const
Return a snapshot of the target groups.
std::vector< lldb::TargetGroupSP > m_groups
TargetGroupList & operator=(TargetGroupList &&)=delete
A class that represents a running process on the host machine.
std::shared_ptr< lldb_private::TargetGroup > TargetGroupSP
std::shared_ptr< lldb_private::Target > TargetSP