
Public Member Functions | |
| CValueArray (Size s) | |
Create a CValueArray of size s. | |
| boolean | isArray () |
| Check if this is an array. | |
| CValueArray | array () |
| Convenience method for accessing an array CValue as CValueArray. | |
| void | setCell (Index i, CValue val) |
| Set the value of a specific cell of an array constant value. | |
| void | addCell (CValue val) |
| Set the value of the next free cell of an array constant value. | |
| CValue | getCell (Index i) |
| Get the value of a specific cell of an array constant value. | |
| boolean | reduceBoolean () |
| Reduce an array of constant boolean values to a single boolean. | |
| Indices | indices () |
| Returns the Indices associated with this constant array. | |
| Size | size () |
| Returns the array size of this constant value. | |
| CValue | convertInteger () |
| Convert each cell to CValueInteger. | |
| CValue | convertReal () |
| Convert each cell to CValueReal. | |
| CValue | convertBoolean () |
| Convert each cell to CValueBoolean. | |
| CValue | convertString () |
| Convert each cell to CValueString. | |
| String | toString () |
| Overloading of the toString() method. | |
| FExp | buildLiteral () |
| Create a literal AST node from constant. | |
| Iterator< CValue > | iterator () |
| An iterator that iterates over all cells in the array. | |
Protected Attributes | |
| Indices | indices |
| CValue[] | values |
Note that this class is mutable, care must be taken not to modify arrays that have already been returned. The only place where that should be done is during function evaluation, where CValues are used to represent mutable variable values. class :0
| org.jmodelica.modelica.compiler.CValueArray.CValueArray | ( | Size | s | ) |
Create a CValueArray of size s.
The array is initially filled with unknown values. Individual values must be set with setCell().
| void org.jmodelica.modelica.compiler.CValueArray.addCell | ( | CValue | val | ) |
Set the value of the next free cell of an array constant value.
"Free" here means the cell after the last one set by addCell(), or the first cell if this is the first call.
| CValueArray org.jmodelica.modelica.compiler.CValueArray.array | ( | ) |
Convenience method for accessing an array CValue as CValueArray.
Only valid for arrays.
Reimplemented from org.jmodelica.modelica.compiler.CValue.
| FExp org.jmodelica.modelica.compiler.CValueArray.buildLiteral | ( | ) |
Create a literal AST node from constant.
Reimplemented from org.jmodelica.modelica.compiler.CValue.
| CValue org.jmodelica.modelica.compiler.CValueArray.convertBoolean | ( | ) |
| CValue org.jmodelica.modelica.compiler.CValueArray.convertInteger | ( | ) |
| CValue org.jmodelica.modelica.compiler.CValueArray.convertReal | ( | ) |
| CValue org.jmodelica.modelica.compiler.CValueArray.convertString | ( | ) |
Get the value of a specific cell of an array constant value.
Returns the Indices associated with this constant array.
| boolean org.jmodelica.modelica.compiler.CValueArray.isArray | ( | ) |
| Iterator<CValue> org.jmodelica.modelica.compiler.CValueArray.iterator | ( | ) |
An iterator that iterates over all cells in the array.
Traverses the array in the same order as indices().iterator().
Reimplemented from org.jmodelica.modelica.compiler.CValue.
| boolean org.jmodelica.modelica.compiler.CValueArray.reduceBoolean | ( | ) |
Reduce an array of constant boolean values to a single boolean.
Used for the test expression of while statements.
Reimplemented from org.jmodelica.modelica.compiler.CValue.
Set the value of a specific cell of an array constant value.
| Size org.jmodelica.modelica.compiler.CValueArray.size | ( | ) |
Returns the array size of this constant value.
Reimplemented from org.jmodelica.modelica.compiler.CValue.
| String org.jmodelica.modelica.compiler.CValueArray.toString | ( | ) |
Overloading of the toString() method.
Reimplemented from org.jmodelica.modelica.compiler.CValue.
CValue [] org.jmodelica.modelica.compiler.CValueArray.values [protected] |
1.5.8