|
properties-cpp 0.0.3
A very simple convenience library for handling properties and signals in C++11.
|
A signal class that observers can subscribe to, template specialization for signals without arguments. More...
#include <signal.h>
Public Types | |
| typedef std::function< void()> | Slot |
| Slot is the function type that observers have to provide to connect to this signal. | |
Public Member Functions | |
| Signal () noexcept(true) | |
| Signal constructs a new instance. Never throws. | |
| ~Signal () | |
| Signal (const Signal &)=delete | |
| Signal & | operator= (const Signal &)=delete |
| bool | operator== (const Signal &) const =delete |
| Connection | connect (const Slot &slot) const |
| Connects the provided slot to this signal instance. | |
| void | operator() () |
| operator () emits the signal. | |
A signal class that observers can subscribe to, template specialization for signals without arguments.
| typedef std::function<void()> core::Signal< void >::Slot |
|
inlinenoexcept |
Signal constructs a new instance. Never throws.
Definition at line 195 of file signal.h.
Referenced by operator=(), operator==(), and Signal().
|
inline |
|
delete |
|
inline |
Connects the provided slot to this signal instance.
Calling this method is thread-safe and synchronized with any other connect, signal emission or disconnect calls.
| slot | The function to be called when the signal is emitted. |
|
inline |
|
delete |
|
delete |