modesteditor.core.stepsimulation
Class DoNode

java.lang.Object
  extended by modesteditor.core.stepsimulation.SimulationNode
      extended by modesteditor.core.stepsimulation.AltNode
          extended by modesteditor.core.stepsimulation.DoNode

public class DoNode
extends AltNode

Class representing an do loop statement in the step simulation tree.


Field Summary
 
Fields inherited from class modesteditor.core.stepsimulation.AltNode
activeChild
 
Fields inherited from class modesteditor.core.stepsimulation.SimulationNode
alphabet, children, column, guard, hidden, isActive, length, line, newLabel, parent
 
Constructor Summary
DoNode(int line, int column, SimulationNode parent)
          Default constructor
 
Method Summary
 void breakTransitionTaken()
          If a break is taken in the scope of the do statement, all other statements in the scope are released and the node is completed.
 void childIsFinished(SimulationNode child)
          Method ensures that if a child is finished, all other children are set active again.
 java.util.List<ParTransition> collectParTransitions()
          Abstract method for generating the list of parallel transitions of the node.
 java.util.List<SimulationNode> collectTransitions()
          Method collects all children if not a child is already active
 void takeTransition()
          No transition to be taken, only child can be consumed.
 
Methods inherited from class modesteditor.core.stepsimulation.AltNode
generateAlphabet, getParentList, isFinished, notificationOfChildActivity, releaseTransitions, setActive
 
Methods inherited from class modesteditor.core.stepsimulation.SimulationNode
addChild, createSimHighlighting, exceptionThrown, getAlphabet, getColumn, getGuard, getLength, getLine, getName, getParent, hide, isActive, isHidden, printTransition, relabelNode, setParent, stopCalled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DoNode

public DoNode(int line,
              int column,
              SimulationNode parent)
Default constructor

Parameters:
line -
column -
parent -
Method Detail

childIsFinished

public void childIsFinished(SimulationNode child)
Method ensures that if a child is finished, all other children are set active again.

Overrides:
childIsFinished in class AltNode
Parameters:
child -

takeTransition

public void takeTransition()
Description copied from class: AltNode
No transition to be taken, only child can be consumed.

Overrides:
takeTransition in class AltNode

breakTransitionTaken

public void breakTransitionTaken()
If a break is taken in the scope of the do statement, all other statements in the scope are released and the node is completed.

Overrides:
breakTransitionTaken in class SimulationNode

collectTransitions

public java.util.List<SimulationNode> collectTransitions()
Method collects all children if not a child is already active

Overrides:
collectTransitions in class AltNode
Returns:
the list of transitions

collectParTransitions

public java.util.List<ParTransition> collectParTransitions()
Description copied from class: SimulationNode
Abstract method for generating the list of parallel transitions of the node. The method also adds disabled transitions for the letters in the alphabet that cannot be taken.

Overrides:
collectParTransitions in class AltNode
Returns:
the list of parallel transitions