provides a lightweight signal / event system More...
#include <signal-signal.hpp>


Public Types | |
| typedef function< void(const TArgs &...)> | Handler |
| represents a function that can connect to the signal More... | |
Public Member Functions | |
| Signal () | |
| ~Signal () | |
| Connection | connect (const Handler &handler) |
| connects a handler to the signal More... | |
| Connection | connectSingleShot (const Handler &handler) |
| connects a single-shot handler to the signal More... | |
provides a lightweight signal / event system
To declare a signal: public: Signal<Owner, T1, T2> signalName; To connect to a signal: owner->signalName.connect(f); Multiple functions can connect to the same signal. To emit a signal from owner: this->signalName(arg1, arg2);
| Owner | the signal owner class; only this class can emit the signal |
| TArgs | types of signal arguments |
Definition at line 50 of file signal-signal.hpp.
| typedef function<void(const TArgs&...)> ndn::util::signal::Signal< Owner, TArgs >::Handler |
represents a function that can connect to the signal
Definition at line 55 of file signal-signal.hpp.
| ndn::util::signal::Signal< Owner, TArgs >::Signal | ( | ) |
Definition at line 151 of file signal-signal.hpp.
| ndn::util::signal::Signal< Owner, TArgs >::~Signal | ( | ) |
Definition at line 157 of file signal-signal.hpp.
| Connection ndn::util::signal::Signal< Owner, TArgs >::connect | ( | const Handler & | handler | ) |
connects a handler to the signal
Definition at line 164 of file signal-signal.hpp.
| Connection ndn::util::signal::Signal< Owner, TArgs >::connectSingleShot | ( | const Handler & | handler | ) |
connects a single-shot handler to the signal
After the handler is executed once, it is automatically disconnected.
Definition at line 174 of file signal-signal.hpp.