Class inria.meije.rc.sugarcubes.Machine
All Packages Class Hierarchy This Package Previous Next Index
Class inria.meije.rc.sugarcubes.Machine
java.lang.Object
|
+----inria.meije.rc.sugarcubes.Instruction
|
+----inria.meije.rc.sugarcubes.Machine
- public class Machine
- extends Instruction
The basic reactive machine. It is also an instruction.
-
endOfInstant
- endOfInstant set to true when current instant is over.
-
eventEnv
- The event environment
-
instant
- The instant number (initially 1).
-
move
- move set to true when something new appears.
-
program
- The program is initialy nothing
-
Machine()
-
-
absencePrinciple()
- The basic absence principle method simply returns endOfInstant.
-
activation(Machine)
- Execution of one instant (does not use the parameter machine).
-
add(Instruction)
- New instructions can be added to the machine.
-
clone()
- Clone a machine.
-
currentInstant()
- Returns the current instant.
-
generate(String)
- Generates an event.
-
getEvent(String)
- Get an event from the environment.
-
isEndOfInstant()
- Is it the end of the current instant.
-
isGenerated(String)
- Tests if an event is generated.
-
newInstant()
- To set a new instant.
-
newMove()
- There is a new move.
-
putEvent(String, Event)
- Put an event in the environment.
-
setNewProgram()
- Sets the new program for next instant.
-
stopReached()
- Called when a stop is executed.
program
public Instruction program
- The program is initialy nothing
eventEnv
protected EventEnv eventEnv
- The event environment
instant
protected int instant
- The instant number (initially 1).
endOfInstant
protected boolean endOfInstant
- endOfInstant set to true when current instant is over.
move
protected boolean move
- move set to true when something new appears.
Machine
public Machine()
newMove
public void newMove()
- There is a new move.
currentInstant
public int currentInstant()
- Returns the current instant.
isEndOfInstant
public boolean isEndOfInstant()
- Is it the end of the current instant.
clone
public Object clone()
- Clone a machine.
- Overrides:
- clone in class Instruction
add
public void add(Instruction inst)
- New instructions can be added to the machine.
getEvent
public Event getEvent(String name)
- Get an event from the environment.
isGenerated
public boolean isGenerated(String name)
- Tests if an event is generated.
generate
public void generate(String name)
- Generates an event.
putEvent
public void putEvent(String name,
Event event)
- Put an event in the environment.
absencePrinciple
public boolean absencePrinciple()
- The basic absence principle method simply returns endOfInstant.
stopReached
public void stopReached()
- Called when a stop is executed.
newInstant
protected void newInstant()
- To set a new instant.
setNewProgram
protected void setNewProgram()
- Sets the new program for next instant.
activation
protected byte activation(Machine machine)
- Execution of one instant (does not use the parameter machine).
- Overrides:
- activation in class Instruction
All Packages Class Hierarchy This Package Previous Next Index