cad.simcad.pathfinding.ui
Class SimMediator

java.lang.Object
  |
  +--cad.simcad.pathfinding.ui.SimMediator

public class SimMediator
extends java.lang.Object

Version:
1.0
Author:
Charles-Philip Bentley

Constructor Summary
SimMediator(SimViewer sv, SimWorldCAC world, Simulator sim)
          Creates new SimMediator
 
Method Summary
 void continueSimulation()
           
 SimObject createSimObject(java.lang.String name)
           
 SimObject createSimObject(java.lang.String name, PathPlace pp)
          Adds a new Simulated Objects in the World
 void decreaseSimSpeed()
           
 void deleteSimObject(SimObject so)
           
 void deleteSimulation()
           
 boolean generateAccident(PathPlace pp)
           
 java.lang.String[] getAvailableMapNames()
           
 Drawable2DObject[] getDrawable2DObjects()
           
 Filler getFiller(java.lang.String name)
           
 java.lang.String[] getFillerNames()
           
 Filler[] getFillers()
           
 GPSConnector getGPSConnector()
           
 AbstractMap getMap()
           
 MDTConnector getMDTConnector()
           
 int getMovingObjectCount()
           
 NetworkConnector getNetworkConnector()
           
 SimEnvironment getSimEnvironment()
           
 int getSimObjectCount()
           
 SimObjectServer getSimObjectServer()
           
 Simulator getSimulator()
           
 SimWorldCAC getSimWorldCAC()
           
 StatServer getStatServer()
           
 int getStepTime()
           
 java.util.Vector getStructureTypesVector()
           
 long getTurnCount()
           
 java.util.Vector getUnitTypesVector()
          A Vector of
 void increaseSimSpeed()
           
 void pauseSimulation()
           
 void populate(Filler fil)
           
 void reCreateEmptyWorld(AbstractMap am)
           
 void setHeuristicFactor(int value)
           
 void startSimulation()
           
 void stopSimulation()
           
 void synchronizeMap()
           
 void updateAmbulancePosition(GPSPosition ps)
           
 void updateAmbulanceStatus(Status s)
           
 void updateSimulation(SimEnvironment world, Simulator sim)
           
 void updateWorld(SimEnvironment se)
          Update the world for the SimMediator users
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimMediator

public SimMediator(SimViewer sv,
                   SimWorldCAC world,
                   Simulator sim)
Creates new SimMediator

Method Detail

getSimEnvironment

public SimEnvironment getSimEnvironment()

getSimWorldCAC

public SimWorldCAC getSimWorldCAC()

getMDTConnector

public MDTConnector getMDTConnector()

getGPSConnector

public GPSConnector getGPSConnector()

getNetworkConnector

public NetworkConnector getNetworkConnector()

getStatServer

public StatServer getStatServer()

getUnitTypesVector

public java.util.Vector getUnitTypesVector()
A Vector of


getStructureTypesVector

public java.util.Vector getStructureTypesVector()

getAvailableMapNames

public java.lang.String[] getAvailableMapNames()

getSimObjectServer

public SimObjectServer getSimObjectServer()

deleteSimObject

public void deleteSimObject(SimObject so)

generateAccident

public boolean generateAccident(PathPlace pp)
Returns:
true if no error

getFillerNames

public java.lang.String[] getFillerNames()

getFillers

public Filler[] getFillers()

getFiller

public Filler getFiller(java.lang.String name)

populate

public void populate(Filler fil)

getMap

public AbstractMap getMap()

setHeuristicFactor

public void setHeuristicFactor(int value)

startSimulation

public void startSimulation()

stopSimulation

public void stopSimulation()

pauseSimulation

public void pauseSimulation()

continueSimulation

public void continueSimulation()

increaseSimSpeed

public void increaseSimSpeed()

decreaseSimSpeed

public void decreaseSimSpeed()

getSimObjectCount

public int getSimObjectCount()

getMovingObjectCount

public int getMovingObjectCount()

getDrawable2DObjects

public Drawable2DObject[] getDrawable2DObjects()

getStepTime

public int getStepTime()

updateWorld

public void updateWorld(SimEnvironment se)
Update the world for the SimMediator users


reCreateEmptyWorld

public void reCreateEmptyWorld(AbstractMap am)

updateSimulation

public void updateSimulation(SimEnvironment world,
                             Simulator sim)

deleteSimulation

public void deleteSimulation()

getSimulator

public Simulator getSimulator()

createSimObject

public SimObject createSimObject(java.lang.String name)

createSimObject

public SimObject createSimObject(java.lang.String name,
                                 PathPlace pp)
Adds a new Simulated Objects in the World

Parameters:
name - the name of the Object to create
pp - the PathPlace where the new Object should be placed
Pre:
a World with a Map. World knows about object with name name
Returns:
a SimObject
Post:
The SimObject of name name is made and returned. It is added to the map at the corresponding PathPalce

getTurnCount

public long getTurnCount()

updateAmbulanceStatus

public void updateAmbulanceStatus(Status s)

updateAmbulancePosition

public void updateAmbulancePosition(GPSPosition ps)

synchronizeMap

public void synchronizeMap()

Logo

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