|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.upb.hni.vmagic.VhdlElement
de.upb.hni.vmagic.LabeledElement
de.upb.hni.vmagic.statement.SequentialStatement
de.upb.hni.vmagic.statement.CaseStatement
public class CaseStatement
Case statement.
EnumerationType stateType = new EnumerationType("STATE_TYPE", "IDLE", "RUN"); Signal state = new Signal("STATE", stateType); CaseStatement statement = new CaseStatement(state); statement.createAlternative(stateType.getLiterals().get(0)). getStatements().add(new ReportStatement("state is idle")); statement.createAlternative(Choices.OTHERS). getStatements().add(new ReportStatement("state is not idle"));
case STATE is when IDLE => report "state is idle"; when others => report "state is not idle"; end case;
Nested Class Summary | |
---|---|
class |
CaseStatement.Alternative
Case statement alternative. |
Constructor Summary | |
---|---|
CaseStatement(Expression expression)
Creates a case statement. |
Method Summary | |
---|---|
CaseStatement.Alternative |
createAlternative(Choice... choices)
Creates a new alternative and adds it to this case statement. |
CaseStatement.Alternative |
createAlternative(java.util.List<Choice> choices)
Creates a new alternative and adds it to this case statement. |
java.util.List<CaseStatement.Alternative> |
getAlternatives()
Returns the alternatives. |
Expression |
getExpression()
Returns the expression. |
void |
setExpression(Expression expression)
Sets the expression. |
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 |
---|
public CaseStatement(Expression expression)
expression
- the expressionMethod Detail |
---|
public Expression getExpression()
public void setExpression(Expression expression)
expression
- the expressionpublic CaseStatement.Alternative createAlternative(Choice... choices)
choices
- one or more choices that select this alternative
public CaseStatement.Alternative createAlternative(java.util.List<Choice> choices)
choices
- a list of choices that select this alternative
public java.util.List<CaseStatement.Alternative> getAlternatives()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |