LibreOffice Module svl (master) 1
Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
SfxBroadcaster Class Reference

#include <SfxBroadcaster.hxx>

Inheritance diagram for SfxBroadcaster:
[legend]

Public Member Functions

 SfxBroadcaster ()
 
 SfxBroadcaster (const SfxBroadcaster &rBC)
 
virtual ~SfxBroadcaster () COVERITY_NOEXCEPT_FALSE
 
void Broadcast (const SfxHint &rHint)
 
bool HasListeners () const
 
size_t GetListenerCount () const
 Get the number of listeners which are registered at this broadcaster. More...
 
void ForAllListeners (std::function< bool(SfxListener *)> f) const
 Iterate over all the listeners and call the passed function. More...
 

Protected Member Functions

void Forward (SfxBroadcaster &rBC, const SfxHint &rHint)
 

Private Member Functions

void AddListener (SfxListener &rListener)
 
void RemoveListener (SfxListener &rListener)
 
const SfxBroadcasteroperator= (const SfxBroadcaster &)=delete
 

Private Attributes

std::vector< size_t > m_RemovedPositions
 Contains the positions of removed listeners. More...
 
std::vector< SfxListener * > m_Listeners
 

Friends

class SfxListener
 
class ::SfxBroadcasterTest
 

Detailed Description

Definition at line 30 of file SfxBroadcaster.hxx.

Constructor & Destructor Documentation

◆ SfxBroadcaster() [1/2]

SfxBroadcaster::SfxBroadcaster ( )
inline

Definition at line 46 of file SfxBroadcaster.hxx.

◆ SfxBroadcaster() [2/2]

SfxBroadcaster::SfxBroadcaster ( const SfxBroadcaster rBC)

Definition at line 61 of file SfxBroadcaster.cxx.

References i, m_Listeners, and SfxListener::StartListening().

◆ ~SfxBroadcaster()

SfxBroadcaster::~SfxBroadcaster ( )
virtual

Member Function Documentation

◆ AddListener()

void SfxBroadcaster::AddListener ( SfxListener rListener)
private

Definition at line 73 of file SfxBroadcaster.cxx.

References DBG_TESTSOLARMUTEX, m_Listeners, and m_RemovedPositions.

Referenced by SfxListener::StartListening().

◆ Broadcast()

void SfxBroadcaster::Broadcast ( const SfxHint rHint)

◆ ForAllListeners()

void SfxBroadcaster::ForAllListeners ( std::function< bool(SfxListener *)>  f) const

Iterate over all the listeners and call the passed function.

return true to break the loop.

Definition at line 134 of file SfxBroadcaster.cxx.

References i, and m_Listeners.

◆ Forward()

void SfxBroadcaster::Forward ( SfxBroadcaster rBC,
const SfxHint rHint 
)
protected

Definition at line 91 of file SfxBroadcaster.cxx.

References i, m_Listeners, and SfxListener::Notify().

Referenced by SfxStyleSheet::Notify().

◆ GetListenerCount()

size_t SfxBroadcaster::GetListenerCount ( ) const

Get the number of listeners which are registered at this broadcaster.

Definition at line 146 of file SfxBroadcaster.cxx.

References m_Listeners, and m_RemovedPositions.

Referenced by HasListeners().

◆ HasListeners()

bool SfxBroadcaster::HasListeners ( ) const

Definition at line 144 of file SfxBroadcaster.cxx.

References GetListenerCount().

◆ operator=()

const SfxBroadcaster & SfxBroadcaster::operator= ( const SfxBroadcaster )
privatedelete

References Forward.

◆ RemoveListener()

void SfxBroadcaster::RemoveListener ( SfxListener rListener)
private

Friends And Related Function Documentation

◆ ::SfxBroadcasterTest

friend class ::SfxBroadcasterTest
friend

Definition at line 61 of file SfxBroadcaster.hxx.

◆ SfxListener

friend class SfxListener
friend

Definition at line 60 of file SfxBroadcaster.hxx.

Member Data Documentation

◆ m_Listeners

std::vector<SfxListener*> SfxBroadcaster::m_Listeners
private

◆ m_RemovedPositions

std::vector<size_t> SfxBroadcaster::m_RemovedPositions
private

Contains the positions of removed listeners.

Definition at line 33 of file SfxBroadcaster.hxx.

Referenced by AddListener(), GetListenerCount(), and RemoveListener().


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