org.nlogo.nvm
Class Context
java.lang.Object
org.nlogo.nvm.Context
- All Implemented Interfaces:
- Cloneable
public final class Context
- extends Object
- implements Cloneable
job
public final Job job
myself
public Agent myself
agent
public Agent agent
agentBit
public int agentBit
ip
public int ip
activation
public Activation activation
waiting
public boolean waiting
stopping
public boolean stopping
- It is necessary for each Context to have its own stopping flag
in order to support the hack where if the last procedure call
in a forever button's code exits via "stop", then the forever button
stops too. This is different from the stopping flag in Job,
which is used for when the user stops a forever button by clicking
on it.
finished
public boolean finished
Context
public Context(Job job,
Agent agent,
int ip,
Activation activation)
Context
public Context(Context context)
makeChildrenExclusive
public boolean makeChildrenExclusive()
hasParentContext
public boolean hasParentContext()
myself
public Agent myself()
atTopActivation
public boolean atTopActivation()
- used for determining whether we are inside an ask inside
the current procedure or not
runExclusiveJob
public void runExclusiveJob(AgentSet agentset,
int address)
throws LogoException
- Throws:
LogoException
makeConcurrentJob
public Job makeConcurrentJob(AgentSet agentset)
returnFromProcedure
public void returnFromProcedure()
evaluateReporter
public Object evaluateReporter(Agent agent,
Reporter reporter)
throws LogoException
- Throws:
LogoException
evaluateDoubleReporter
public double evaluateDoubleReporter(Agent agent,
DoubleReporter reporter)
throws LogoException
- Throws:
LogoException
callReporterProcedure
public Object callReporterProcedure(Activation newActivation)
throws LogoException
- Throws:
LogoException
let
public void let(Let let,
Object value)
getLet
public Object getLet(Let let)
setLet
public void setLet(Let let,
Object value)
toString
public String toString()
- Overrides:
toString
in class Object
buildRuntimeErrorMessage
public String buildRuntimeErrorMessage(Instruction instruction,
Throwable throwable)