Menge
Modular Pedestrian Simulation Framework for Research and Development
|
The definition of a response to an event. More...
#include <EventEffect.h>
Public Member Functions | |
EventEffect () | |
Constructor. | |
virtual bool | isCompatible (EventTarget *target)=0 |
Reports if the given target is compatible with this effect. More... | |
virtual void | apply (EventTarget *target)=0 |
Applies the effect to the simulation target. More... | |
virtual void | finalize () |
Allows the event effect to finish initializing itself from its parsed state to its running state. More... | |
Public Member Functions inherited from Menge::Element | |
void | destroy () |
This supplants the destructor. More... | |
virtual BFSM::Task * | getTask () |
Return an optional task associated with this element. More... | |
virtual SceneGraph::GLNode * | getSGNode () |
Returns an optional visualization element associated with the element. More... | |
Friends | |
class | EventEffectFactory |
The definition of a response to an event.
Event effects determine how the simulation changes due to a triggered event. The EventEffect is responsible for changing the simulation of the event target (and optionally caching the original state). Essentially, the event effect is the operator, and the corresponding EventTarget is the operand.
|
pure virtual |
Applies the effect to the simulation target.
Not all targets work with all effects. The target passed here must have previously passed the EventEffect::isCompatible test to work.
target | The target to apply the event to. |
Implemented in Menge::AgentEventEffect.
|
inlinevirtual |
Allows the event effect to finish initializing itself from its parsed state to its running state.
EventException | if there is a problem finalizing. |
|
pure virtual |
Reports if the given target is compatible with this effect.
Each effect can only work on certain types of targets. This function reports if the given target works with this effect.
target | The target instance to test. |
Implemented in Menge::AgentEventEffect.