LLDB mainline
Public Member Functions | Static Public Member Functions | Protected Member Functions | Private Types | Private Member Functions | Private Attributes | Friends | List of all members
lldb_private::BroadcasterManager Class Reference

#include <Broadcaster.h>

Inheritance diagram for lldb_private::BroadcasterManager:
Inheritance graph
[legend]

Public Member Functions

 ~BroadcasterManager ()=default
 
lldb::ListenerSP GetListenerForEventSpec (const BroadcastEventSpec &event_spec) const
 
void SignUpListenersForBroadcaster (Broadcaster &broadcaster)
 
void RemoveListener (const lldb::ListenerSP &listener_sp)
 
void RemoveListener (Listener *listener)
 
void Clear ()
 

Static Public Member Functions

static lldb::BroadcasterManagerSP MakeBroadcasterManager ()
 Listeners hold onto weak pointers to their broadcaster managers.
 

Protected Member Functions

 BroadcasterManager ()
 

Private Types

typedef std::pair< BroadcastEventSpec, lldb::ListenerSPevent_listener_key
 
typedef std::map< BroadcastEventSpec, lldb::ListenerSPcollection
 
typedef std::set< lldb::ListenerSPlistener_collection
 

Private Member Functions

uint32_t RegisterListenerForEventsNoLock (const lldb::ListenerSP &listener_sp, const BroadcastEventSpec &event_spec)
 
bool UnregisterListenerForEventsNoLock (const lldb::ListenerSP &listener_sp, const BroadcastEventSpec &event_spec)
 

Private Attributes

collection m_event_map
 
listener_collection m_listeners
 
std::mutex m_manager_mutex
 

Friends

class Listener
 

Detailed Description

Definition at line 74 of file Broadcaster.h.

Member Typedef Documentation

◆ collection

Definition at line 110 of file Broadcaster.h.

◆ event_listener_key

Definition at line 109 of file Broadcaster.h.

◆ listener_collection

Definition at line 111 of file Broadcaster.h.

Constructor & Destructor Documentation

◆ BroadcasterManager()

BroadcasterManager::BroadcasterManager ( )
protected

Definition at line 388 of file Broadcaster.cpp.

Referenced by MakeBroadcasterManager().

◆ ~BroadcasterManager()

lldb_private::BroadcasterManager::~BroadcasterManager ( )
default

Member Function Documentation

◆ Clear()

void BroadcasterManager::Clear ( )

Definition at line 543 of file Broadcaster.cpp.

References m_event_map, m_listeners, and m_manager_mutex.

◆ GetListenerForEventSpec()

ListenerSP BroadcasterManager::GetListenerForEventSpec ( const BroadcastEventSpec event_spec) const

Definition at line 462 of file Broadcaster.cpp.

References m_event_map, and m_manager_mutex.

◆ MakeBroadcasterManager()

lldb::BroadcasterManagerSP BroadcasterManager::MakeBroadcasterManager ( )
static

Listeners hold onto weak pointers to their broadcaster managers.

So they must be made into shared pointers, which you do with MakeBroadcasterManager.

Definition at line 390 of file Broadcaster.cpp.

References BroadcasterManager().

◆ RegisterListenerForEventsNoLock()

uint32_t BroadcasterManager::RegisterListenerForEventsNoLock ( const lldb::ListenerSP listener_sp,
const BroadcastEventSpec event_spec 
)
private

◆ RemoveListener() [1/2]

void BroadcasterManager::RemoveListener ( const lldb::ListenerSP listener_sp)

Definition at line 503 of file Broadcaster.cpp.

References m_event_map, m_listeners, and m_manager_mutex.

◆ RemoveListener() [2/2]

void BroadcasterManager::RemoveListener ( Listener listener)

Definition at line 478 of file Broadcaster.cpp.

References m_event_map, m_listeners, and m_manager_mutex.

◆ SignUpListenersForBroadcaster()

void BroadcasterManager::SignUpListenersForBroadcaster ( Broadcaster broadcaster)

◆ UnregisterListenerForEventsNoLock()

bool BroadcasterManager::UnregisterListenerForEventsNoLock ( const lldb::ListenerSP listener_sp,
const BroadcastEventSpec event_spec 
)
private

Friends And Related Function Documentation

◆ Listener

friend class Listener
friend

Definition at line 77 of file Broadcaster.h.

Member Data Documentation

◆ m_event_map

collection lldb_private::BroadcasterManager::m_event_map
private

◆ m_listeners

listener_collection lldb_private::BroadcasterManager::m_listeners
private

◆ m_manager_mutex

std::mutex lldb_private::BroadcasterManager::m_manager_mutex
mutableprivate

The documentation for this class was generated from the following files: