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 | Protected Attributes | List of all members
Menge::EventTrigger Class Referenceabstract

The base class for event triggers. More...

#include <EventTrigger.h>

Inheritance diagram for Menge::EventTrigger:
Menge::Element Menge::StateEvtTrigger Menge::StatePopIncreaseTrigger

Public Member Functions

 EventTrigger ()
 Constructor.
 
virtual void finalize ()
 Allows the trigger to finish initializing itself from its parsed state to its running state. More...
 
bool conditionMet ()
 Evaluates the condition to see if it has been met. More...
 
void fired ()
 Informs the trigger that the associated event effects have been applied (i.e. the event has been fired).
 
- 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 bool testCondition ()=0
 Evaluates the condition to see if it has been met. More...
 

Protected Attributes

float _firePeriod
 The minimum time between two successive firings (in simulation seconds).
 
float _lastFire
 The time of the last firing (global simulation time).
 

Detailed Description

The base class for event triggers.

An event trigger specifies the conditions under which an event is triggered (allowing registered event handlers to respond).

Member Function Documentation

bool Menge::EventTrigger::conditionMet ( )

Evaluates the condition to see if it has been met.

Returns
True if the condition has been met, false otherwise.
virtual void Menge::EventTrigger::finalize ( )
inlinevirtual

Allows the trigger to finish initializing itself from its parsed state to its running state.

Exceptions
EventExceptionif there is a problem finalizing.

Reimplemented in Menge::StatePopIncreaseTrigger, and Menge::StateEvtTrigger.

virtual bool Menge::EventTrigger::testCondition ( )
protectedpure virtual

Evaluates the condition to see if it has been met.

This must be implemented by all sub-classes.

Returns
True if the condition has been met, false otherwise.

Implemented in Menge::StatePopIncreaseTrigger.


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