diff --git a/libeventdisp.a b/libeventdisp.a index cbe0742..2f02acb 100644 Binary files a/libeventdisp.a and b/libeventdisp.a differ diff --git a/source/eventy/engine.d b/source/eventy/engine.d index c7b4267..c96cc39 100644 --- a/source/eventy/engine.d +++ b/source/eventy/engine.d @@ -1,5 +1,9 @@ module eventy.engine; +import eventy.queues : Queue; +import eventy.signal : Signal; +import eventy.event : Event; + /** * Engine @@ -13,5 +17,31 @@ module eventy.engine; */ public final class Engine { + /* TODO: Or use a queue data structure */ + private Queue[] queues; + /* TODO: Or use a queue data structure */ + private Signal[] handlers; + + this() + { + + } + + /** + * push(Event e) + * + * Provided an Event, `e`, this will enqueue the event + * to + */ + public void push(Event e) + { + + } + + public ulong[] getTypes() + { + /* TODO: Implement me */ + return null; + } } \ No newline at end of file diff --git a/source/eventy/event.d b/source/eventy/event.d new file mode 100644 index 0000000..2e77320 --- /dev/null +++ b/source/eventy/event.d @@ -0,0 +1,18 @@ +module eventy.event; + +/** +* Event +* +* An Event represents a trigger for a given signal(s) +* handlers which associate with the given typeID +*/ +public class Event +{ + /** + * + */ + this(ulong typeID) + { + + } +} \ No newline at end of file diff --git a/source/eventy/queues.d b/source/eventy/queues.d new file mode 100644 index 0000000..a27d2ea --- /dev/null +++ b/source/eventy/queues.d @@ -0,0 +1,13 @@ +module eventy.queues; + +/** +* Queue +* +* Represents a queue with a given ID that can +* have Event-s enqueued to it +*/ +public final class Queue +{ + private ulong id; + /* TODO: Add queue of Event's here */ +} \ No newline at end of file diff --git a/source/eventy/signal.d b/source/eventy/signal.d new file mode 100644 index 0000000..7bdd74c --- /dev/null +++ b/source/eventy/signal.d @@ -0,0 +1,22 @@ +module eventy.signal; + +import eventy.event : Event; + +/** +* Signal +* +* Represents a signal handler that handles a given set of typeIDs +* which means that it contains an associated function to be run +* on handling of a given Event +*/ +alias EventHandler = void function(Event); + +public class Signal +{ + private ulong[] typeIDs; + + this(ulong[] typeIDs, EventHandler handler) + { + + } +} \ No newline at end of file