public abstract class AbstractScalarAssignment extends AbstractAssignment
| Modifier and Type | Field and Description |
|---|---|
protected AbstractValue |
resultValue |
isLocalexprblock, rootSTRUCT_ARRAY, STRUCT_SCALAR, STRUCT_STRUCTURE, TYPE_BOOL, TYPE_DYNAMIC, TYPE_FLOAT, TYPE_INTEGER, TYPE_NUMERIC, TYPE_STRING, TYPE_UNDEF| Constructor and Description |
|---|
AbstractScalarAssignment(Expression root) |
| Modifier and Type | Method and Description |
|---|---|
Expression |
getExpression()
Return the associated expression.
|
AbstractValue |
getResult() |
short |
getResultStructure()
Return the structure of the result for the expression.
|
short |
getResultType()
Return the type of the result for the expression.
|
Variable |
getVariable(java.lang.String varName)
Return a variable declared by the expression.
|
void |
setExpression(Expression expr) |
void |
setResult(AbstractValue resultValue) |
void |
setResult(AbstractValue resultValue,
boolean isCreated)
Set the result.
|
addLocalVariable, addLocalVariable, addVariable, addVariable, isCreated, isLocalgetVariablesclone, evalAsBoolean, evalAsFloat, evalAsInt, getParentBlock, getRoot, setParentBlock, setRootequals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitclone, eval, evalAsBoolean, evalAsFloat, evalAsInt, getExpressionName, getLocalVariable, getLocalVariables, getParentBlock, getRoot, getVariable, getVariables, hasVariable, hasVariable, removeVariable, setParentBlockprotected AbstractValue resultValue
public AbstractScalarAssignment(Expression root)
public void setResult(AbstractValue resultValue, boolean isCreated)
resultValue - the result valueisCreated - true if the assignment assign a local variablepublic void setResult(AbstractValue resultValue)
public AbstractValue getResult()
public short getResultType()
ExpressionExpressionType.TYPE_INTEGER: integerExpressionType.TYPE_FLOAT: floatExpressionType.TYPE_NUMERIC: integer or float value. The runtime actual type may depend on the expression argumentsExpressionType.TYPE_STRING: stringExpressionType.TYPE_DYNAMIC: dynamic type. The runtime actual type may depend on the expression argumentsExpressionType.TYPE_UNDEF: undefined type. The default type, characteristic of an error if entountered.public short getResultStructure()
ExpressionExpressionType.STRUCT_SCALAR: a scalar valueExpressionType.STRUCT_ARRAY: an array valuepublic Variable getVariable(java.lang.String varName)
ExpressionvarName - the variable namepublic void setExpression(Expression expr)
public Expression getExpression()
ExpressionCopyright © 2018 Herve Girod. All Rights Reserved. Documentation and source under the BSD licence