public static class CalculatorExpr.SetExprBase
extends java.lang.Object
CalculatorExpr.SetExprBase.SetExpr
is a helper class which contains a CalculatorExpr
as composite.
That CalculatorExpr
will be filled with the operations which are assembled with this helper.
Last the CalculatorExpr.SetExprBase.SetExpr.expr()
should be invoked to get the expression. After them this instance can be garbaged.
It provides a set interface to the CalculatorExpr to store set parse results for the expression,
especially able to use for the ZBNF parser using ZbnfJavaOutput
.
CalculatorExpr.SetExprBase.SetExpr.new_dataAccess()
to access any data or CalculatorExpr.SetExprBase.SetExpr.set_doubleValue(double)
to start with a constant value.
Both methods stores a set operation with the given value and returns this or a proper instance for further operations.
CalculatorExpr.SetExprBase.SetExpr.newDataAccessSet()
returns an instance for the DataAccess
data.
With that filled instance CalculatorExpr.SetExprBase.SetExpr.add_dataAccess(org.vishia.util.DataAccess.DataAccessSet)
should be called then.
CalculatorExpr.SetExprBase.SetExpr.new_multOperation()
, then SetExpr.set_xyzValue(val) and after them
SetExpr#add_multOperation(...)
. Any new_xyz operation stores the old one operation and sets a new empty operation as the current one.
The following data are set to this operation. The following add_mult...() sets the operator and adds the operation.
CalculatorExpr.SetExprBase.SetExpr.new_parenthesisExpr()
stores and clears the actOperation
. Thus such as CalculatorExpr.SetExprBase.SetExpr.set_intValue(int)
creates an new set operation which is stored ad start-Operation.If the execution sees a start operation and the accumulator contains any data,
the accumulator will be stored in the stack and filled with the new value.
Modifier and Type | Class and Description |
---|---|
class |
CalculatorExpr.SetExprBase.SetExpr
Instances of this inner class are created with parenthesis expressions and for the whole expression.
|
Modifier and Type | Field and Description |
---|---|
private CalculatorExpr.Operation |
actOperation |
protected java.lang.Object |
dbgParent |
CalculatorExpr |
expr |
Constructor and Description |
---|
SetExprBase(boolean d) |
SetExprBase(boolean d,
java.lang.Object dbgParent) |
SetExprBase(CalculatorExpr.SetExprBase parent) |
SetExprBase(CalculatorExpr expr) |
private CalculatorExpr.Operation actOperation
public final CalculatorExpr expr
protected final java.lang.Object dbgParent
public SetExprBase(boolean d, java.lang.Object dbgParent)
public SetExprBase(boolean d)
public SetExprBase(CalculatorExpr expr)
public SetExprBase(CalculatorExpr.SetExprBase parent)