Samchon Framework for CPP
1.0.0
|
Event representing an error. More...
#include <ErrorEvent.hpp>
Public Member Functions | |
ErrorEvent (EventDispatcher *source, const std::string &message) | |
Construct from source and error-id. More... | |
auto | getMessage () const -> std::string |
Get error-id. More... | |
Public Member Functions inherited from samchon::library::Event | |
Event (EventDispatcher *source, int type) | |
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 | |
std::string | message |
Error message. More... | |
Protected Attributes inherited from samchon::library::Event | |
EventDispatcher * | source |
Source of the event. More... | |
int | type |
Type of the event. More... | |
Event representing an error.
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.
Definition at line 18 of file ErrorEvent.hpp.
|
inline |
Construct from source and error-id.
The event object owns its source and type
source | Source of the event; who made the event |
id | An error-id |
Definition at line 50 of file ErrorEvent.hpp.
References message.
|
inline |
|
protected |
Error message.
Definition at line 35 of file ErrorEvent.hpp.
Referenced by ErrorEvent(), and getMessage().