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.

Variable Index

 o endOfInstant
endOfInstant set to true when current instant is over.
 o eventEnv
The event environment
 o instant
The instant number (initially 1).
 o move
move set to true when something new appears.
 o program
The program is initialy nothing

Constructor Index

 o Machine()

Method Index

 o absencePrinciple()
The basic absence principle method simply returns endOfInstant.
 o activation(Machine)
Execution of one instant (does not use the parameter machine).
 o add(Instruction)
New instructions can be added to the machine.
 o clone()
Clone a machine.
 o currentInstant()
Returns the current instant.
 o generate(String)
Generates an event.
 o getEvent(String)
Get an event from the environment.
 o isEndOfInstant()
Is it the end of the current instant.
 o isGenerated(String)
Tests if an event is generated.
 o newInstant()
To set a new instant.
 o newMove()
There is a new move.
 o putEvent(String, Event)
Put an event in the environment.
 o setNewProgram()
Sets the new program for next instant.
 o stopReached()
Called when a stop is executed.

Variables

 o program
  public Instruction program
The program is initialy nothing
 o eventEnv
  protected EventEnv eventEnv
The event environment
 o instant
  protected int instant
The instant number (initially 1).
 o endOfInstant
  protected boolean endOfInstant
endOfInstant set to true when current instant is over.
 o move
  protected boolean move
move set to true when something new appears.

Constructors

 o Machine
  public Machine()

Methods

 o newMove
  public void newMove()
There is a new move.
 o currentInstant
  public int currentInstant()
Returns the current instant.
 o isEndOfInstant
  public boolean isEndOfInstant()
Is it the end of the current instant.
 o clone
  public Object clone()
Clone a machine.
Overrides:
clone in class Instruction
 o add
  public void add(Instruction inst)
New instructions can be added to the machine.
 o getEvent
  public Event getEvent(String name)
Get an event from the environment.
 o isGenerated
  public boolean isGenerated(String name)
Tests if an event is generated.
 o generate
  public void generate(String name)
Generates an event.
 o putEvent
  public void putEvent(String name,
                       Event event)
Put an event in the environment.
 o absencePrinciple
  public boolean absencePrinciple()
The basic absence principle method simply returns endOfInstant.
 o stopReached
  public void stopReached()
Called when a stop is executed.
 o newInstant
  protected void newInstant()
To set a new instant.
 o setNewProgram
  protected void setNewProgram()
Sets the new program for next instant.
 o 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