8#ifndef INCLUDED_BALL_BROADCASTOBSERVER
9#define INCLUDED_BALL_BROADCASTOBSERVER
185#include <balscm_version.h>
203#include <bsl_memory.h>
204#include <bsl_string.h>
205#include <bsl_unordered_map.h>
280 const
bsl::string_view& observerName);
295 template <class t_OBSERVER>
297 bsl::shared_ptr<t_OBSERVER> *result,
298 const
bsl::string_view& observerName,
299 typename
bsl::enable_if<
304 return *result ? 0 : 1;
345 template <class t_VISITOR>
354 const
bsl::string_view& observerName) const;
369 template <class t_OBSERVER>
371 const
bsl::string_view& observerName,
372 typename
bsl::enable_if<
373 bsl::is_convertible<const t_OBSERVER *,
375 void *>::type = 0)
const
378 return *result ? 0 : 1;
394 template <
class t_VISITOR>
409: d_observers(
bslma::Default::allocator(basicAllocator))
414template <
class t_VISITOR>
421 it != d_observers.
cend();
423 visitor(it->second, it->first);
433 return static_cast<int>(d_observers.
size());
436template <
class t_VISITOR>
443 it != d_observers.
cend();
445 visitor(it->second, it->first);
Definition ball_broadcastobserver.h:226
void visitObservers(t_VISITOR &visitor)
Definition ball_broadcastobserver.h:416
bsl::unordered_map< bsl::string, bsl::shared_ptr< Observer >, bdlb::TransparentHash, bdlb::TransparentEqualTo > ObserverRegistry
Definition ball_broadcastobserver.h:236
int registerObserver(const bsl::shared_ptr< Observer > &observer, const bsl::string_view &observerName)
int deregisterObserver(const bsl::string_view &observerName)
bsl::shared_ptr< Observer > findObserver(const bsl::string_view &observerName)
~BroadcastObserver() BSLS_KEYWORD_OVERRIDE
void publish(const bsl::shared_ptr< const Record > &record, const Context &context) BSLS_KEYWORD_OVERRIDE
void deregisterAllObservers()
Remove all observers from the registry of this broadcast observer.
int numRegisteredObservers() const
Definition ball_broadcastobserver.h:429
void releaseRecords() BSLS_KEYWORD_OVERRIDE
Definition ball_context.h:295
Definition ball_observer.h:235
virtual void publish(const Record &record, const Context &context)
Definition bslstl_stringview.h:441
Definition bslstl_sharedptr.h:1830
Definition bslstl_unorderedmap.h:1089
const_iterator cbegin() const BSLS_KEYWORD_NOEXCEPT
Definition bslstl_unorderedmap.h:3350
size_type size() const BSLS_KEYWORD_NOEXCEPT
Return the number of elements in this unordered map.
Definition bslstl_unorderedmap.h:3544
const_iterator cend() const BSLS_KEYWORD_NOEXCEPT
Definition bslstl_unorderedmap.h:3359
BloombergLP::bslstl::HashTableIterator< const value_type, difference_type > const_iterator
Definition bslstl_unorderedmap.h:1160
Definition bslma_allocator.h:457
Definition bslmt_readlockguard.h:287
Definition bslmt_readerwritermutex.h:244
#define BSLS_IDENT(str)
Definition bsls_ident.h:195
#define BSLS_KEYWORD_OVERRIDE
Definition bsls_keyword.h:653
Definition ball_administration.h:214
Definition bdlb_printmethods.h:283
basic_string< char > string
Definition bslstl_string.h:782
Definition balxml_encoderoptions.h:68
Definition bdlb_transparentequalto.h:124
Definition bdlb_transparenthash.h:158
static void dynamicCast(bsl::shared_ptr< TARGET > *target, const bsl::shared_ptr< SOURCE > &source)
Definition bslstl_sharedptr.h:6111