An event that can have handlers subscribe to it, which in turn will be called when the event is invoked.
More...
|
| | Event () noexcept=default |
| | Constructs an Event.
|
| | Event (const Event &e) noexcept |
| | Constructs an Event via copy.
|
| | Event (Event &&e) noexcept |
| | Constructs an Event via move.
|
| size_t | count () const noexcept |
| | Gets the number of handlers subscribed to the event.
|
| HandlerId | subscribe (const std::function< void(const T &)> &handler) noexcept |
| | Subscribes a handler to the event.
|
| void | unsubscribe (HandlerId id) noexcept |
| | Unsubscribes a handler from the event.
|
| void | invoke (const T ¶m) const noexcept |
| | Invokes the event, calling all handlers.
|
| HandlerId | operator+= (const std::function< void(const T &)> &handler) noexcept |
| | Subscribes a handler to the event.
|
| void | operator-= (HandlerId id) noexcept |
| | Unsubscribes a handler from the event.
|
| void | operator() (const T ¶m) noexcept |
| | Invokes the event, calling all handlers.
|
| Event & | operator= (const Event &e) noexcept |
| | Copies an Event.
|
| Event & | operator= (Event &&e) noexcept |
| | Moves an Event.
|
| | operator bool () const noexcept |
| | Gets whether or not the object is valid or not.
|
template<DerivedEventArgs T>
class Nickvision::Events::Event< T >
An event that can have handlers subscribe to it, which in turn will be called when the event is invoked.
- Template Parameters
-