![]() |
Lysa
0.0
Lysa 3D Engine
|
Signal helper used by Object and engine nodes.
Notes:
Public Typedefs | |
| using | signal = std::string |
| using | Handler = std::function< void (void *)> |
Public Member Functions | |
| void | connect (const Handler &handler) |
| void | emit (void *params) const |
| using Handler = std::function<void(void*)> |
Slot/handler signature invoked on emit(). Parameter is an optional opaque pointer forwarded by the emitter.
|
inline |
Connects a handler to this signal.
Handlers are appended and will be invoked in connection order when emit() is called. The callable is copied into internal storage.
| void emit | ( | void * | params | ) | const |
Emits the signal by invoking all connected handlers in connection order.
Complexity is O(N) where N is the number of connected handlers. Any exception thrown by a handler will propagate to the caller.
| params | Optional opaque pointer forwarded to handlers (may be nullptr). |