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. More... | |
Public Member Functions | |
Signal () noexcept(true) | |
Signal constructs a new instance. Never throws. More... | |
~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. More... | |
void | operator() () |
operator () emits the signal. More... | |
A signal class that observers can subscribe to, template specialization for signals without arguments.
typedef std::function<void()> core::Signal< void >::Slot |
|
inlinenoexcept |
|
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 |