|
LLDB mainline
|
A group of related targets and the roles they play in that relationship. More...
#include <TargetGroup.h>
Classes | |
| struct | Entry |
Public Types | |
| enum class | Role { CPU , Accelerator } |
| Describes the part a target plays in this group. More... | |
Public Member Functions | |
| TargetGroup (const TargetGroup &)=delete | |
| Target groups have identity and maintain backlinks in their member targets, so they cannot be copied or moved. | |
| TargetGroup & | operator= (const TargetGroup &)=delete |
| TargetGroup (TargetGroup &&)=delete | |
| TargetGroup & | operator= (TargetGroup &&)=delete |
| ~TargetGroup () | |
| llvm::StringRef | GetDescription () const |
| llvm::Error | AddTarget (const lldb::TargetSP &target_sp, Role role) |
Add target_sp to the group with role. | |
| bool | RemoveTarget (const lldb::TargetSP &target_sp) |
Remove target_sp from the group. | |
| std::optional< Role > | GetRole (const lldb::TargetSP &target_sp) const |
Return the role assigned to target_sp, if it is a member. | |
| std::vector< lldb::TargetSP > | GetTargets () const |
| Return every target in the group. | |
| std::vector< lldb::TargetSP > | GetTargets (Role role) const |
Return targets whose role is role. | |
Private Member Functions | |
| TargetGroup (const lldb::DebuggerSP &debugger_sp, llvm::StringRef description, std::shared_ptr< std::recursive_mutex > mutex) | |
Private Attributes | |
| lldb::DebuggerWP | m_debugger_wp |
| std::string | m_description |
| std::shared_ptr< std::recursive_mutex > | m_mutex |
| std::vector< Entry > | m_entries |
| Targets are weakly held so membership does not extend their lifetime. | |
Friends | |
| class | TargetGroupList |
A group of related targets and the roles they play in that relationship.
Target::Destroy() automatically removes a target from all its groups; clients do not need to remove memberships during target destruction.
Definition at line 29 of file TargetGroup.h.
|
strong |
Describes the part a target plays in this group.
| Enumerator | |
|---|---|
| CPU | |
| Accelerator | |
Definition at line 32 of file TargetGroup.h.
|
delete |
Target groups have identity and maintain backlinks in their member targets, so they cannot be copied or moved.
Create one with Debugger::GetTargetGroupList().CreateTargetGroup().
References TargetGroup().
Referenced by operator=(), operator=(), TargetGroup(), and TargetGroup().
|
delete |
References TargetGroup().
| TargetGroup::~TargetGroup | ( | ) |
Definition at line 19 of file TargetGroup.cpp.
References m_entries.
|
inlineprivate |
Definition at line 72 of file TargetGroup.h.
References m_debugger_wp, m_description, and m_mutex.
| llvm::Error TargetGroup::AddTarget | ( | const lldb::TargetSP & | target_sp, |
| Role | role ) |
Add target_sp to the group with role.
Adding an existing member succeeds only when its role matches role.
Definition at line 24 of file TargetGroup.cpp.
References m_debugger_wp, m_entries, and m_mutex.
|
inline |
Definition at line 46 of file TargetGroup.h.
References m_description.
| std::optional< TargetGroup::Role > TargetGroup::GetRole | ( | const lldb::TargetSP & | target_sp | ) | const |
Return the role assigned to target_sp, if it is a member.
Definition at line 81 of file TargetGroup.cpp.
| std::vector< TargetSP > TargetGroup::GetTargets | ( | ) | const |
Return every target in the group.
Definition at line 95 of file TargetGroup.cpp.
Return targets whose role is role.
Definition at line 107 of file TargetGroup.cpp.
|
delete |
References TargetGroup().
|
delete |
References TargetGroup().
| bool TargetGroup::RemoveTarget | ( | const lldb::TargetSP & | target_sp | ) |
Remove target_sp from the group.
Definition at line 57 of file TargetGroup.cpp.
|
friend |
Definition at line 65 of file TargetGroup.h.
References TargetGroupList.
Referenced by TargetGroupList.
|
private |
Definition at line 77 of file TargetGroup.h.
Referenced by AddTarget(), and TargetGroup().
|
private |
Definition at line 78 of file TargetGroup.h.
Referenced by GetDescription(), and TargetGroup().
|
private |
Targets are weakly held so membership does not extend their lifetime.
Definition at line 81 of file TargetGroup.h.
Referenced by AddTarget(), GetRole(), GetTargets(), GetTargets(), RemoveTarget(), and ~TargetGroup().
|
private |
Definition at line 79 of file TargetGroup.h.
Referenced by AddTarget(), GetRole(), GetTargets(), GetTargets(), RemoveTarget(), and TargetGroup().