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

#include <Broadcaster.h>

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

Classes

class  BroadcasterClassMatches
 
class  BroadcastEventSpecMatches
 
class  ListenerMatches
 
class  ListenerMatchesAndSharedBits
 
class  ListenerMatchesPointer
 

Public Member Functions

 ~BroadcasterManager ()=default
 
uint32_t RegisterListenerForEvents (const lldb::ListenerSP &listener_sp, const BroadcastEventSpec &event_spec)
 
bool UnregisterListenerForEvents (const lldb::ListenerSP &listener_sp, const BroadcastEventSpec &event_spec)
 
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. More...
 

Protected Member Functions

 BroadcasterManager ()
 

Private Types

typedef std::pair< BroadcastEventSpec, lldb::ListenerSP > event_listener_key
 
typedef std::map< BroadcastEventSpec, lldb::ListenerSP > collection
 
typedef std::set< lldb::ListenerSP > listener_collection
 

Private Attributes

collection m_event_map
 
listener_collection m_listeners
 
std::recursive_mutex m_manager_mutex
 

Friends

class Listener
 

Detailed Description

Definition at line 74 of file Broadcaster.h.

Member Typedef Documentation

◆ collection

typedef std::map<BroadcastEventSpec, lldb::ListenerSP> lldb_private::BroadcasterManager::collection
private

Definition at line 109 of file Broadcaster.h.

◆ event_listener_key

typedef std::pair<BroadcastEventSpec, lldb::ListenerSP> lldb_private::BroadcasterManager::event_listener_key
private

Definition at line 108 of file Broadcaster.h.

◆ listener_collection

Definition at line 110 of file Broadcaster.h.

Constructor & Destructor Documentation

◆ BroadcasterManager()

BroadcasterManager::BroadcasterManager ( )
protected

Definition at line 320 of file Broadcaster.cpp.

Referenced by MakeBroadcasterManager().

◆ ~BroadcasterManager()

lldb_private::BroadcasterManager::~BroadcasterManager ( )
default

Member Function Documentation

◆ Clear()

void BroadcasterManager::Clear ( )

Definition at line 456 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 390 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 322 of file Broadcaster.cpp.

References BroadcasterManager().

◆ RegisterListenerForEvents()

uint32_t BroadcasterManager::RegisterListenerForEvents ( const lldb::ListenerSP &  listener_sp,
const BroadcastEventSpec event_spec 
)

◆ RemoveListener() [1/2]

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

Definition at line 423 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 403 of file Broadcaster.cpp.

References m_event_map, m_listeners, and m_manager_mutex.

◆ SignUpListenersForBroadcaster()

void BroadcasterManager::SignUpListenersForBroadcaster ( Broadcaster broadcaster)

◆ UnregisterListenerForEvents()

bool BroadcasterManager::UnregisterListenerForEvents ( const lldb::ListenerSP &  listener_sp,
const BroadcastEventSpec event_spec 
)

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::recursive_mutex lldb_private::BroadcasterManager::m_manager_mutex
mutableprivate

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