![]() |
Lysa
0.0
Lysa 3D Engine
|
Simplify multiple subscription management. This collection is not thread-safe.
Public Member Functions | |
| EventSubscriptions () = default | |
| ~EventSubscriptions () | |
| EventSubscriptions (const EventSubscriptions &) = delete | |
| EventSubscriptions & | operator= (const EventSubscriptions &) = delete |
| unique_id | subscribe (const event_type &type, EventHandlerCallback handler) |
| unique_id | subscribe (const event_type &type, unique_id target, EventHandlerCallback handler) |
| unique_id | subscribe (const event_type &type, SignalHandlerCallback handler) |
| void | unsubscribe (unique_id id) |
| void | clear () |
|
default |
Construct an empty collection without accessing the context.
| ~EventSubscriptions | ( | ) |
Remove all owned subscriptions.
|
delete |
| void clear | ( | ) |
Remove all owned subscriptions
|
delete |
| unique_id subscribe | ( | const event_type & | type, |
| EventHandlerCallback | handler | ||
| ) |
Subscribe to queued events
| type | Event kind to receive. |
| handler | Callback owned by the event manager. |
| unique_id subscribe | ( | const event_type & | type, |
| SignalHandlerCallback | handler | ||
| ) |
Subscribe to a synchronous signal
| type | Signal kind to receive. |
| handler | Callback owned by the signal manager. |
| unique_id subscribe | ( | const event_type & | type, |
| unique_id | target, | ||
| EventHandlerCallback | handler | ||
| ) |
Subscribe to queued events
| type | Event kind to receive. |
| target | Target identifier matched against Event::id. |
| handler | Callback owned by the event manager. |
| void unsubscribe | ( | unique_id | id | ) |
Remove one owned subscription