1
0
mirror of https://github.com/deavmi/eventy.git synced 2024-09-21 03:02:53 +02:00
eventy/source/eventy/event.d

28 lines
516 B
D
Raw Normal View History

2021-08-27 16:12:48 +02:00
module eventy.event;
2022-11-26 18:39:00 +02:00
/**
* Event
*
* An Event represents a trigger for a given signal(s)
* handlers which associate with the given typeID
*
* It can optionally take a payload with it as well
*/
2021-08-27 16:12:48 +02:00
public class Event
{
/**
2022-01-16 14:21:09 +02:00
* Creates a new Event, optionally taking with is a
* payload
2021-08-27 16:12:48 +02:00
*/
2022-01-16 14:21:09 +02:00
this(ulong typeID, ubyte[] payload = null)
2021-08-27 16:12:48 +02:00
{
2021-09-01 15:33:15 +02:00
this.id = typeID;
2022-01-16 14:21:09 +02:00
this.payload = payload;
2021-08-27 16:12:48 +02:00
}
2021-08-31 11:34:29 +02:00
ulong id;
2022-01-16 14:21:09 +02:00
ubyte[] payload;
2022-11-26 18:39:00 +02:00
// TODO: Remove the requirement for the payload
2022-01-16 14:21:09 +02:00
}