36 for (
size_t i = 0;
i < nSize; ++
i)
40 pListener->
Notify(*
this, rHint);
97 pListener->
Notify(rBC, rHint);
109 int positionOfRemovedElement = -1;
115 positionOfRemovedElement =
i + 1;
119 positionOfRemovedElement =
i - 1;
123 if (positionOfRemovedElement == -1)
126 positionOfRemovedElement = std::distance(
m_Listeners.begin(), aIter);
void RemoveListener(SfxListener &rListener)
bool HasListeners() const
void AddListener(SfxListener &rListener)
std::vector< size_t > m_RemovedPositions
Contains the positions of removed listeners.
std::vector< SfxListener * > m_Listeners
size_t GetListenerCount() const
Get the number of listeners which are registered at this broadcaster.
void ForAllListeners(std::function< bool(SfxListener *)> f) const
Iterate over all the listeners and call the passed function.
void Broadcast(const SfxHint &rHint)
void Forward(SfxBroadcaster &rBC, const SfxHint &rHint)
virtual ~SfxBroadcaster() COVERITY_NOEXCEPT_FALSE
void StartListening(SfxBroadcaster &rBroadcaster, DuplicateHandling eDuplicateHanding=DuplicateHandling::Unexpected)
Registers a specific SfxBroadcaster.
void RemoveBroadcaster_Impl(SfxBroadcaster &rBC)
virtual void Notify(SfxBroadcaster &rBC, const SfxHint &rHint)
#define DBG_TESTSOLARMUTEX()