![]() |
Lumiera 0.pre.04~rc.1
»edit your freedom«
|
#include "lib/time/control-impl.hpp"
Implementation building block: propagate changes to listeners.
The Propagator manages a set of callback signals, allowing to propagate notifications for changed Time values.
There are no specific requirements on the acceptable listeners, besides exposing a function-call operator to feed the changed time value to. Both Mutator and Propagator employ one primary template parameter, which is the type of the time values to be fed in and propagated.
Definition at line 126 of file control-impl.hpp.
Public Member Functions | |
| template<class SIG > | |
| void | attach (SIG const &toNotify) |
| install notification receiver | |
| void | disconnect () |
| disconnect any observers | |
| TI | operator() (TI const &changedVal) const |
| publish a change | |
Private Types | |
| typedef function< void(TI const &)> | ChangeSignal |
| typedef std::vector< ChangeSignal > | ListenerList |
Private Attributes | |
| ListenerList | listeners_ |
|
private |
Definition at line 128 of file control-impl.hpp.
|
private |
Definition at line 129 of file control-impl.hpp.
|
inline |
install notification receiver
Definition at line 137 of file control-impl.hpp.
References Propagator< TI >::listeners_.
|
inline |
disconnect any observers
Definition at line 145 of file control-impl.hpp.
References Propagator< TI >::listeners_.
|
inline |
publish a change
Definition at line 152 of file control-impl.hpp.
References Propagator< TI >::listeners_.
|
private |
Definition at line 131 of file control-impl.hpp.
Referenced by Propagator< TI >::attach(), Propagator< TI >::disconnect(), and Propagator< TI >::operator()().
Collaboration diagram for Propagator< TI >: