Package svs_simulation :: Package entities :: Module base_entities :: Class Entity
[show private | hide private]
[frames | no frames]

Class Entity

Known Subclasses:
BasicSpatialEntity, EntityGroup, MovingEntity_OLD

Generic entity for simulation. All simulation entities are derived from this.
Method Summary
  __init__(self)
  decode(self, data)
Applies encoded data to self.
  encode(self)
Returns encoded representation of self.
  enterPartition(self, partition)
Called when entity enters a partition.
  enterStructure(self, structure)
Called when entity enters a structure.
  enterWorld(self, world)
Called when entity is added to world.
  exitPartition(self, partition)
Called when entity is leaves a structure.
  exitWorld(self, simTime)
Called when structure is removed world.
  getName(self)
If the entity has a name, return this, otherwise returns a name created from its class name and unique id.
  handleSimEvent(self, event)
Handles event form simulation.
boolean isTagged(self)
Returns tag state.
  placeInWorld(self)
Sets the structure and partition that the entity is within.
  reportChange(self, data)
Forwards data representing change in entity to process handler.
  setup(self)
  startWorld(self, simTime)
Called when the simulation world starts running, or if an entity has been added to a world after it has started.
  stopWorld(self, simTime)
Called when the simulation world stops running, or if an entity has been removed from a world after it has started.
  updateWorld(self, simTime)
Called when the simulation world updates.

Method Details

decode(self, data)

Applies encoded data to self.

encode(self)

Returns encoded representation of self.

@rtype:dict

enterPartition(self, partition)

Called when entity enters a partition.

enterStructure(self, structure)

Called when entity enters a structure.

enterWorld(self, world)

Called when entity is added to world.

exitPartition(self, partition=None)

Called when entity is leaves a structure.

exitWorld(self, simTime)

Called when structure is removed world.

getName(self)

If the entity has a name, return this, otherwise returns a name created from its class name and unique id.

handleSimEvent(self, event)

Handles event form simulation.

This should be overridden by extending classes.

isTagged(self)

Returns tag state.
Returns:
boolean

placeInWorld(self)

Sets the structure and partition that the entity is within.

reportChange(self, data)

Forwards data representing change in entity to process handler.

Changes are handled as events.

startWorld(self, simTime)

Called when the simulation world starts running, or if an entity has been added to a world after it has started.

stopWorld(self, simTime)

Called when the simulation world stops running, or if an entity has been removed from a world after it has started.

updateWorld(self, simTime)

Called when the simulation world updates.

Generated by Epydoc 2.1 on Thu Oct 20 15:30:28 2005 http://epydoc.sf.net