Engine

Engine

An instance of this represents an engine that can, at any time, handle the delivery of new events, trigger the correct signal handlers for the respective events, remove signal handlers, add signal handlers, among many other things

Constructors

this
this(EngineSettings settings)

Instantiates a new Eventy engine with the provided configuration

this
this()

Instantiates a new Eventy engine with the default settings

Members

Functions

addEventType
void addEventType(EventType evType)

Registers a new EventType with the engine and then adds it.

addSignalHandler
void addSignalHandler(Signal e)

Attaches a new signal handler to the engine

findEventType
EventType findEventType(ulong id)

Given an if, this will return the EventType associated with said id

getConfig
EngineSettings getConfig()

Returns the current configuration paremeters being used by the engine

getSignalsForEvent
Signal[] getSignalsForEvent(Event e)

Returns all the signal handlers responsible for handling the type of Event provided

hasEventsRunning
bool hasEventsRunning()

Checks whether or not there are still events running at the time of calling

isSignalExists
bool isSignalExists(ulong id)

Checks if there is a signal handler that handles the given event id

push
void push(Event e)

Pushes the given Event into the engine for eventual dispatch

setConfig
void setConfig(EngineSettings newSettings)

Updates the current configuration of the engine

shutdown
void shutdown()

Shuts down the event engine

Meta