#include <ecsm.hpp>
Public Types | |
| using | Subscribers = std::vector<std::function<void()>> |
Public Member Functions | |
| Event (std::string_view name, bool isOrdered=true) | |
| Creates a new event container. | |
| bool | hasSubscribers () const noexcept |
| Returns true if this event has subscribers. | |
| void | run () const |
| Calls all event subscribers. (Ordered). | |
Public Attributes | |
| std::string | name |
| Subscribers | subscribers |
| bool | isOrdered = false |
Event data container.
|
inline |
Creates a new event container.
| name | target event name |
| isOrdered | should event execute in order |
| std::string name |
Unique name of the event.
| Subscribers subscribers |
Event subscribers array.
| bool isOrdered = false |
Does this event execute in order.