BloombergLP::ball::BroadcastObserver

This class provides a broadcasting implementation of the Observer protocol.

Synopsis

Declared in <ball_broadcastobserver.h>

class BroadcastObserver
    : public Observer

Description

Other concrete observers may be registered and named with this broadcast observer (registerObserver method), retrieved (findObserver method), and unregistered (deregisterObserver method). The publish method of this class forwards the log records that it receives to the publish method of each registered observer.

Base Classes

NameDescription
ObserverThis class provides a protocol for receiving and processing log record output.

Type Aliases

NameDescription
ObserverRegistry This typedef is an alias for the type of the registry maintained by this observer.

Member Functions

NameDescription
BroadcastObserver [constructor]Create a broadcast observer having no registered observers.
~BroadcastObserver [destructor] [virtual]Destroy this broadcast observer. Note that this method has no effect on the lifetime of observers registered with this observer, if any.
deregisterAllObservers Remove all observers from the registry of this broadcast observer.
deregisterObserver Remove the named observer from the registry.
findObserver findObserver overloads
numRegisteredObservers Return the number of observers registered with this broadcast observer.
publish publish overloads
registerObserver Register the specified observer under observerName.
releaseRecords [virtual]Discard any shared reference to a Record object held by this observer.
visitObservers Invoke visitor on each observer in this broadcast observer's registry.

Using Declarations

NameDescription
publish Import the base-class publish overloads.