de.upb.hni.vmagic.statement
Class NextStatement

java.lang.Object
  extended by de.upb.hni.vmagic.VhdlElement
      extended by de.upb.hni.vmagic.LabeledElement
          extended by de.upb.hni.vmagic.statement.SequentialStatement
              extended by de.upb.hni.vmagic.statement.NextStatement

public class NextStatement
extends SequentialStatement

Next statement.

Example:
vMAGIC code:
LoopStatement loop = new LoopStatement();
loop.setLabel("INF_LOOP");
loop.getStatements().add(new NextStatement(loop));
loop.getStatements().add(new ReportStatement("not reached"));
VHDL output:
INF_LOOP : loop
    next INF_LOOP;
    report "not reached";
end loop;

Constructor Summary
NextStatement()
          Creates a next statement.
NextStatement(Expression condition)
          Creates a next statement with the given condition.
NextStatement(LoopStatement loop)
          Creates a next statement for the given loop.
NextStatement(LoopStatement loop, Expression condition)
          Creates a next statement for the given loop with a condition.
 
Method Summary
 Expression getCondition()
          Returns the condition for this next statement.
 LoopStatement getLoop()
          Returns the associated loop statement.
 void setCondition(Expression condition)
          Sets the condition for this next statement.
 void setLoop(LoopStatement loop)
          Sets the associated loop statement.
 
Methods inherited from class de.upb.hni.vmagic.statement.SequentialStatement
getLabel, setLabel
 
Methods inherited from class de.upb.hni.vmagic.VhdlElement
getParent, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

NextStatement

public NextStatement()
Creates a next statement.


NextStatement

public NextStatement(LoopStatement loop)
Creates a next statement for the given loop.

Parameters:
loop - the loop

NextStatement

public NextStatement(Expression condition)
Creates a next statement with the given condition.

Parameters:
condition - the condition

NextStatement

public NextStatement(LoopStatement loop,
                     Expression condition)
Creates a next statement for the given loop with a condition.

Parameters:
loop - the loop
condition - the condition
Method Detail

getCondition

public Expression getCondition()
Returns the condition for this next statement.

Returns:
the condition

setCondition

public void setCondition(Expression condition)
Sets the condition for this next statement.

Parameters:
condition - the condition

getLoop

public LoopStatement getLoop()
Returns the associated loop statement.

Returns:
the loop statement or null if no loop is set

setLoop

public void setLoop(LoopStatement loop)
Sets the associated loop statement.

Parameters:
loop - the loop statement or null to remove loop