Events

by ACWraith
A library for handling what happens and when. (Events and triggers.)
ID:128851
 

This library sacrifices some speed to store dynamic data on events and triggers.

The bulk of this library has been used in PathWrath. However, limited support for event arguments has also been added. For example, if you have an event which changes an attribute then you can send in the value to change it by. However, a source object can only have one argument per event/trigger pair.

To Use:

  • Create an events_Holder to keep track of what things can be triggered to perform events, what things can be triggered to add events, and what things can be triggered to remove events.
  • Create events with events_Event. (Mainly, you derive a type and define what Perform() does.)
  • Create triggers with events_Trigger and call their Triggered() procs in your code where you want events activated, added, or removed.