#include <arg_observer.h>
Public Members | |||
subject () | |||
subject& | add_observer (observer* addee) | ||
subject& | remove_observer (observer* removee) | ||
const subject& | notify (const notify_strategy& notify) const | ||
Enumerate elements of list passing them to the notify functor. |
The user code is responsible for ensuring that all observer pointers are valid when notify
is invoked.
All methods support the strong exception safety guarantee.
template<class observer> arg::subject<observer>::subject<observer> () |
template<class observer> subject<observer> & arg::subject<observer>::add_observer (observer * addee) [inline]
|
addee | pointer to observer, must remain valid while broadcasts are possible. |
template<class observer> subject<observer> & arg::subject<observer>::remove_observer (observer * removee) [inline]
|
removee | pointer to observer. |
template<class observer> const subject<observer> & arg::subject<observer>::notify (const notify_strategy & notify) const [inline]
|
Enumerate elements of list passing them to the notify
functor.