cad.simcad.objectserver.spec.sim
Interface Simulator

All Known Implementing Classes:
CoreTimeMaster

public interface Simulator

This is the interface towards the Simulator Engine module CoreTimeMaster.java

Version:
1.0
Author:
Charles-Philip Bentley

Method Summary
 void continueSimulation()
          Signals the simulation engine to continue the simulation.
 boolean decreaseSpeed()
          Signals the simulation to decrease the speed at which time is ticking.
 void exitSimulation()
          Signals the simulation engine to quit the simulation.
 int getTimeStep()
          Return the time for a simulation turn
 long getTurnCount()
          Return the turn counter value of the Simulator
 boolean increaseSpeed()
          Signals the simulation to increase the speed at which time is ticking.
 void pauseSimulation()
          Signals the simulation engine to pause the simulation.
 void setSimViewer(SimViewer sv)
          Set the SimViewer for this Simulator
 void startSimulation()
          Signals the simulation engine to start the simulation.
 void stopSimulation()
          Signals the simulation engine to stop the simulation.
 

Method Detail

startSimulation

public void startSimulation()
Signals the simulation engine to start the simulation.

Pre:
-
Post:
-

pauseSimulation

public void pauseSimulation()
Signals the simulation engine to pause the simulation.

Pre:
-
Post:
-

continueSimulation

public void continueSimulation()
Signals the simulation engine to continue the simulation.

Pre:
-
Post:
-

stopSimulation

public void stopSimulation()
Signals the simulation engine to stop the simulation.

Pre:
-
Post:
-

exitSimulation

public void exitSimulation()
Signals the simulation engine to quit the simulation.

Pre:
-
Post:
-

increaseSpeed

public boolean increaseSpeed()
Signals the simulation to increase the speed at which time is ticking.

Pre:
-
Returns:
a boolean value telling if the speed has been increased or not
Post:
The simulation has increased its speed by 1 unit, then return true If we are at top speed allowed by the Simulator, return false

decreaseSpeed

public boolean decreaseSpeed()
Signals the simulation to decrease the speed at which time is ticking.

Pre:
-
Returns:
a boolean value telling if the speed has been decreased or not
Post:
The simulation has decreased its speed by 1 unit, then return true If we are at lowest speed allowed by the Simulator, return false

getTurnCount

public long getTurnCount()
Return the turn counter value of the Simulator

Pre:
-
Returns:
a long value
Post:
the number of Turns elapsed is returned

getTimeStep

public int getTimeStep()
Return the time for a simulation turn

Pre:
-
Returns:
a int value
Post:
the time in millisecond that the simulator is using for a turn

setSimViewer

public void setSimViewer(SimViewer sv)
Set the SimViewer for this Simulator

Parameters:
sv - A SimViewer object
Pre:
-
Post:
sv is now the only one SimViewer for this simulator

Logo

With the help of www.sourceforge.net and www.info.ucl.ac.be