Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members

SimulationEvent Class Reference

#include <Simulation.h>

Inheritance diagram for SimulationEvent:

SimulationEndEvent List of all members.

Detailed Description

A SimulationEvent changes the simulation state at a given time.

This includes object and/or event creation, modification and/or deletion. Events are sorted along a time axis, and the simulation clock jumps from event to event, while the simulation executes each event's method (Handle).

Author:
Thomas Jacob

Definition at line 213 of file Simulation.h.

Public Member Functions

SimulationGetSimulation ()
 Returns the corresponding simulation for the event.

long GetTime ()
 Returns the time when the event shall happen.

virtual void Handle ()
 The main event method.

 SimulationEvent ()
 Creates a new simulation event.

virtual ~SimulationEvent ()
 Destroys the simulation event.


Private Attributes

SimulationSimulation
 The corresponding simulation for the event.

friend Simulation
long Time
 The time when the event shall happen.


Constructor & Destructor Documentation

SimulationEvent  ) 
 

Creates a new simulation event.

virtual ~SimulationEvent  )  [virtual]
 

Destroys the simulation event.


Member Function Documentation

class Simulation* GetSimulation  )  [inline]
 

Returns the corresponding simulation for the event.

Returns:
The corresponding simulation for the event.

long GetTime  )  [inline]
 

Returns the time when the event shall happen.

Returns:
The time when the event shall happen.

virtual void Handle  )  [virtual]
 

The main event method.

This method is called by the simulation to perform the specific event actions, such as event or object creation, modification or deletion. Override this method in your derived events. Events are automatically deleted after they have been executed.

Reimplemented in SimulationEndEvent.


Member Data Documentation

class Simulation* Simulation [private]
 

The corresponding simulation for the event.

Definition at line 229 of file Simulation.h.

friend Simulation [private]
 

Definition at line 215 of file Simulation.h.

long Time [private]
 

The time when the event shall happen.

Definition at line 234 of file Simulation.h.


The documentation for this class was generated from the following file:
Generated on Tue Oct 3 00:23:41 2006 for ToolBox by doxygen 1.3.6