bool attached(const IObserver &observer) const noexcept
Check whether passed observer is already attached. Because this function is protected, no thread-safety operation is performed inside it.
Definition: iobservable.cpp:53
virtual ~IObservable()
Definition: iobservable.cpp:11
virtual void detach(IObserver &observer)
Detach given observer from this observable.
Definition: iobservable.cpp:27
std::mutex _observers_lock
Definition: iobservable.h:53
Definition: broadcastdaemon.cpp:7
virtual void notify(VideoFrame &frame) noexcept
Notify all attached observers of new data.
Definition: iobservable.cpp:44
Every IVideoSource that broadcasts video frames needs to implement this interface, which defines the observable (subject / publisher) part of the observer design pattern (aka subscriber-publisher).
Definition: iobservable.h:42
virtual void attach(IObserver &observer)
Attach given observer to this observable. If observer already attached, no action is taken...
Definition: iobservable.cpp:16
A class to represent a video frame.
Definition: videoframe.h:47
Every observer interested in listening to IVideoSource data must implement this interface, which defines the observer (subscriber) part of the observer design pattern (aka subscriber-publisher).
Definition: iobserver.h:35
std::vector< IObserver *> _observers
Definition: iobservable.h:48