Samchon Framework for CPP
1.0.0
|
Represent an event running on background. More...
#include <Event.hpp>
Public Member Functions | |
Event (EventDispatcher *, int) | |
Construct from source and type. More... | |
auto | getSource () const -> EventDispatcher * |
Get source of the Event. More... | |
auto | getType () const -> int |
Get type of the Event. More... | |
Protected Attributes | |
EventDispatcher * | source |
Source of the event. More... | |
int | type |
Type of the event. More... | |
Represent an event running on background.
The Event class is used as the base class for the creation of Event objects, which are passed as parameters to event listeners when an event occurs.
The properties of the Event class carry basic information about an event, such as the event's type or source (who made the event) of the event.
For many events, such as the events represented by the Event class constants, this basic information is sufficient. Other events, however, may require more detailed information.
Event is a candidate to be deprecated.
Since C++11, calling member method of a class by a new thread passing by static method and using void pointer are recommeded to avoid. As the reason, using std::thread and std::bind will be better.
Event::Event | ( | EventDispatcher * | source, |
int | type | ||
) |
auto Event::getSource | ( | ) | const -> EventDispatcher* |
auto Event::getType | ( | ) | const -> int |
|
protected |
Source of the event.
Definition at line 56 of file Event.hpp.
Referenced by Event(), and getSource().
|
protected |