cad.simcad.worldsimulator.objects
Class SimulatedObject

java.lang.Object
  |
  +--cad.simcad.worldsimulator.objects.SimulatedObject
All Implemented Interfaces:
java.io.Serializable, SimObject
Direct Known Subclasses:
MyUnit, SimAccident, Structure

public abstract class SimulatedObject
extends java.lang.Object
implements SimObject

Super Class for all objects we want to simulate in the world

Version:
1.0
Author:
Charles-Philip Bentley
See Also:
Serialized Form

Field Summary
protected  AbstractMap _am
           
protected  java.lang.String _className
           
protected  int _height
           
protected  int _id
           
protected  java.lang.String _name
           
protected  ObjectMediator _om
           
protected  Owner _owner
           
protected  long _serial
           
protected  SimEnvironment _sime
           
protected  int _stateId
           
protected  int _width
           
 
Constructor Summary
SimulatedObject(SimEnvironment sime, ObjectMediator om, Owner owner, java.lang.String className)
          Creates new SimulatedObject
 
Method Summary
 java.lang.String getClassName()
          This method returns the object internal name.
abstract  PathPlace getCurrentPathPlace()
          Return the PathPlace for this object Could be null
 int getHeight()
          Returns the Height the SimObject
 int getId()
          Returns the Identifying number of the SimObject
 java.lang.String getName()
          This method returns the object name.
 long getSerialNumber()
          Every Object has a unique serial number
 int getStateId()
          Returns the state id of the SimObject Method that will be used by the simulation to recognize auxilliary state
 int getWidth()
          Returns the Width of the SimObject
 void setStateId(int i)
           
abstract  void stopObject()
          Stop the object activity
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface cad.simcad.objectserver.spec.sim.SimObject
getBoundingCircleRadius, getObjectType, takeTurn
 

Field Detail

_am

protected AbstractMap _am

_sime

protected SimEnvironment _sime

_owner

protected Owner _owner

_om

protected ObjectMediator _om

_width

protected int _width

_height

protected int _height

_stateId

protected int _stateId

_id

protected int _id

_name

protected java.lang.String _name

_className

protected java.lang.String _className

_serial

protected long _serial
Constructor Detail

SimulatedObject

public SimulatedObject(SimEnvironment sime,
                       ObjectMediator om,
                       Owner owner,
                       java.lang.String className)
Creates new SimulatedObject

Method Detail

getWidth

public int getWidth()
Description copied from interface: SimObject
Returns the Width of the SimObject

Specified by:
getWidth in interface SimObject
Returns:
a positive integer value

getHeight

public int getHeight()
Description copied from interface: SimObject
Returns the Height the SimObject

Specified by:
getHeight in interface SimObject
Returns:
a positive integer value

getClassName

public java.lang.String getClassName()
Description copied from interface: SimObject
This method returns the object internal name. Name never shown to users

Specified by:
getClassName in interface SimObject
Returns:
a String object

getName

public java.lang.String getName()
Description copied from interface: SimObject
This method returns the object name. Name used to be shown

Specified by:
getName in interface SimObject
Returns:
a String object

getId

public int getId()
Description copied from interface: SimObject
Returns the Identifying number of the SimObject

Specified by:
getId in interface SimObject
Returns:
a positive integer value

getStateId

public int getStateId()
Description copied from interface: SimObject
Returns the state id of the SimObject Method that will be used by the simulation to recognize auxilliary state

Specified by:
getStateId in interface SimObject
Returns:
a positive integer value

setStateId

public void setStateId(int i)
Specified by:
setStateId in interface SimObject

stopObject

public abstract void stopObject()
Description copied from interface: SimObject
Stop the object activity

Specified by:
stopObject in interface SimObject

getSerialNumber

public long getSerialNumber()
Every Object has a unique serial number

Specified by:
getSerialNumber in interface SimObject

getCurrentPathPlace

public abstract PathPlace getCurrentPathPlace()
Return the PathPlace for this object Could be null

Specified by:
getCurrentPathPlace in interface SimObject

Logo

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