Menge
Modular Pedestrian Simulation Framework for Research and Development
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Member Functions | List of all members
Menge::AgentEventEffect Class Referenceabstract

The event effect class that operates on sets of agents. More...

#include <AgentEventEffect.h>

Inheritance diagram for Menge::AgentEventEffect:
Menge::EventEffect Menge::Element Menge::AgentPropertyEffect< Manipulator >

Public Member Functions

virtual bool isCompatible (EventTarget *target)
 Reports if the given target is compatible with this effect. More...
 
virtual void apply (EventTarget *target)
 Applies the effect to the simulation target. More...
 
- Public Member Functions inherited from Menge::EventEffect
 EventEffect ()
 Constructor.
 
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::TaskgetTask ()
 Return an optional task associated with this element. More...
 
virtual SceneGraph::GLNodegetSGNode ()
 Returns an optional visualization element associated with the element. More...
 

Protected Member Functions

virtual void agentEffect (Agents::BaseAgent *agent)=0
 The actual work of the effect. More...
 

Detailed Description

The event effect class that operates on sets of agents.

Member Function Documentation

virtual void Menge::AgentEventEffect::agentEffect ( Agents::BaseAgent agent)
protectedpure virtual

The actual work of the effect.

Sub-classes should implement this. It is the action to be taken for each agent.

Parameters
agentThe agent to operate on.

Implemented in Menge::AgentPropertyEffect< Manipulator >.

void Menge::AgentEventEffect::apply ( EventTarget target)
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.

Parameters
targetThe target to apply the event to.

Implements Menge::EventEffect.

bool Menge::AgentEventEffect::isCompatible ( EventTarget target)
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.

Parameters
targetThe target instance to test.
Returns
True if the target is a valid argument to EventEffect::apply, false, otherwise.

Implements Menge::EventEffect.


The documentation for this class was generated from the following files: