CaseOp#
- class ansys.scade.apitools.expr.access.CaseOp(expression: scade.model.suite.ExprCall)#
Bases:
CallExpressionProvides the case expression.
Here is the format:
( case
of `` | : | ... | : | _ : ) See the case_op example.
Notes#
The design differs slightly from the meta-model. The
Casecase used to implement thecasecollection is replaced by a tuple (pattern,flow).A new property,
default, provides the optional default value.Parameters#
- expression :
Call expression to wrap.
Initialize the instance from the Scade expression.
Overview#
Import detail#
from ansys.scade.apitools.expr.access import CaseOp
Property detail#
- property CaseOp.cases: list[tuple[Expression, Expression]]#
Pairs (
Expression,Expression) to build the case.
- property CaseOp.default: Expression | None#
Value to use as default when not
None.
- property CaseOp.switch: Expression#
Selector of the case expression.