com.azalient.api.sim.agents
Interface IBlocker

All Known Subinterfaces:
IAgent, IAttached, ICrossing, IMotor, IParkingLane, IPerson, IPhaseCrossing, IRecheckableBlocker, IStream, ITransport, IVehicle

public interface IBlocker

This describes an object that can block agents. An agent itself also implements this, as an agent can block other agents.


Method Summary
 boolean blocked()
          Is this blocker currently blocked?
 String blockerDescription()
          A textual description of this blocker for use in information windows and debugging
 double blockPointDistance(IAgent agent, IXyz agentHead)
          Return the distance to the point of blocking from the given agent "head"
 void doneBlocking(IAgent agent)
          When an agent is no longer blocked by this blocker, pass the blocked agent to the blocker in case it wants to do something with it, for example, delete it from a list of remembered blocked agents.
 void nowBlocking(IAgent agent)
          When an agent becomes blocked by this blocker, pass the blocked agent to the blocker in case it wants to remember it.
 

Method Detail

blockerDescription

String blockerDescription()
A textual description of this blocker for use in information windows and debugging


blocked

boolean blocked()
Is this blocker currently blocked?


blockPointDistance

double blockPointDistance(IAgent agent,
                          IXyz agentHead)
Return the distance to the point of blocking from the given agent "head"


nowBlocking

void nowBlocking(IAgent agent)
When an agent becomes blocked by this blocker, pass the blocked agent to the blocker in case it wants to remember it. This may be called some time after the blocker becomes blocked, for example, when a ped arrives at a crossing and becomes blocked at that crossing, it calls this, which in turn fires the ped button pushed event.


doneBlocking

void doneBlocking(IAgent agent)
When an agent is no longer blocked by this blocker, pass the blocked agent to the blocker in case it wants to do something with it, for example, delete it from a list of remembered blocked agents. This may be called while the blocker is still blocked.