
Public Member Functions | |
| String | errorDesc () |
| Get a string describing this CValue for use in ConstantEvaluationExceptions. | |
| int | intValue () |
| Convert to int, default implementation. | |
| double | realValue () |
| Convert to double, default implementation. | |
| boolean | booleanValue () |
| Convert to boolean, default implementation. | |
| String | stringValue () |
| Convert to string, default implementation. | |
| FExp | buildLiteral () |
| Create a literal AST node from constant, default implementation. | |
| CValue | convertInteger () |
| Convert to CValueInteger, default implementation. | |
| CValue | convertReal () |
| Convert to CValueReal, default implementation. | |
| CValue | convertBoolean () |
| Convert to CValueBoolean, default implementation. | |
| CValue | convertString () |
| Convert to CValueString, default implementation. | |
| boolean | isNumeric () |
| Returns true if the constant value is of numeric type. | |
| boolean | isUnknown () |
| Check if there was an error in the evaluation. | |
| boolean | isUnsupported () |
| Check if there was a compliance error in the evaluation. | |
| String | toString () |
| Overloading of the toString() method. | |
| boolean | isArray () |
| Check if this is an array. | |
| CValueArray | array () |
| Convenience method for accessing an array CValue as CValueArray. | |
| boolean | isRecord () |
| Check if this is a record. | |
| CValueRecord | record () |
| Convenience method for accessing a record CValue as CValueRecord. | |
| boolean | reduceBoolean () |
| Reduce an array of constant boolean values to a single boolean. | |
| Size | size () |
| Returns the array size of this constant value. | |
| Iterator< CValue > | iterator () |
| Iterates over all array cells in CValue. | |
| CValue | valueXML () |
Static Public Attributes | |
| static final CValue | UNKNOWN = new CValueUnknown() |
| An unknown value. | |
| static final CValue | UNSUPPORTED = new CValueUnsupported() |
| An unknown value for an expression that constant evaluation isn't supported for. | |
Protected Member Functions | |
| CValue () | |
| Default constructor. | |
class :0
| org.jmodelica.modelica.compiler.CValue.CValue | ( | ) | [protected] |
Default constructor.
| CValueArray org.jmodelica.modelica.compiler.CValue.array | ( | ) |
Convenience method for accessing an array CValue as CValueArray.
Only valid for arrays.
Reimplemented in org.jmodelica.modelica.compiler.CValueArray.
| boolean org.jmodelica.modelica.compiler.CValue.booleanValue | ( | ) |
Convert to boolean, default implementation.
Reimplemented in org.jmodelica.modelica.compiler.CValueBoolean.
| FExp org.jmodelica.modelica.compiler.CValue.buildLiteral | ( | ) |
Create a literal AST node from constant, default implementation.
Reimplemented in org.jmodelica.modelica.compiler.CValueArray, org.jmodelica.modelica.compiler.CValueBoolean, org.jmodelica.modelica.compiler.CValueEnum, org.jmodelica.modelica.compiler.CValueInteger, org.jmodelica.modelica.compiler.CValueReal, org.jmodelica.modelica.compiler.CValueRecord, and org.jmodelica.modelica.compiler.CValueString.
| CValue org.jmodelica.modelica.compiler.CValue.convertBoolean | ( | ) |
Convert to CValueBoolean, default implementation.
Reimplemented in org.jmodelica.modelica.compiler.CValueArray, and org.jmodelica.modelica.compiler.CValueBoolean.
| CValue org.jmodelica.modelica.compiler.CValue.convertInteger | ( | ) |
Convert to CValueInteger, default implementation.
Reimplemented in org.jmodelica.modelica.compiler.CValueArray, and org.jmodelica.modelica.compiler.CValueInteger.
| CValue org.jmodelica.modelica.compiler.CValue.convertReal | ( | ) |
Convert to CValueReal, default implementation.
Reimplemented in org.jmodelica.modelica.compiler.CValueArray, and org.jmodelica.modelica.compiler.CValueReal.
| CValue org.jmodelica.modelica.compiler.CValue.convertString | ( | ) |
Convert to CValueString, default implementation.
Reimplemented in org.jmodelica.modelica.compiler.CValueArray, and org.jmodelica.modelica.compiler.CValueString.
| String org.jmodelica.modelica.compiler.CValue.errorDesc | ( | ) |
Get a string describing this CValue for use in ConstantEvaluationExceptions.
Reimplemented in org.jmodelica.modelica.compiler.CValueString, and org.jmodelica.modelica.compiler.CValueUnknown.
| int org.jmodelica.modelica.compiler.CValue.intValue | ( | ) |
Convert to int, default implementation.
Reimplemented in org.jmodelica.modelica.compiler.CValueBoolean, org.jmodelica.modelica.compiler.CValueEnum, org.jmodelica.modelica.compiler.CValueInteger, and org.jmodelica.modelica.compiler.CValueReal.
| boolean org.jmodelica.modelica.compiler.CValue.isArray | ( | ) |
| boolean org.jmodelica.modelica.compiler.CValue.isNumeric | ( | ) |
Returns true if the constant value is of numeric type.
Reimplemented in org.jmodelica.modelica.compiler.CValueInteger, and org.jmodelica.modelica.compiler.CValueReal.
| boolean org.jmodelica.modelica.compiler.CValue.isRecord | ( | ) |
| boolean org.jmodelica.modelica.compiler.CValue.isUnknown | ( | ) |
Check if there was an error in the evaluation.
Reimplemented in org.jmodelica.modelica.compiler.CValueUnknown.
| boolean org.jmodelica.modelica.compiler.CValue.isUnsupported | ( | ) |
Check if there was a compliance error in the evaluation.
Reimplemented in org.jmodelica.modelica.compiler.CValueUnsupported.
| Iterator<CValue> org.jmodelica.modelica.compiler.CValue.iterator | ( | ) |
Iterates over all array cells in CValue.
A scalar CValue is considered to have a single array cell.
Reimplemented in org.jmodelica.modelica.compiler.CValueArray.
| double org.jmodelica.modelica.compiler.CValue.realValue | ( | ) |
Convert to double, default implementation.
Reimplemented in org.jmodelica.modelica.compiler.CValueInteger, and org.jmodelica.modelica.compiler.CValueReal.
| CValueRecord org.jmodelica.modelica.compiler.CValue.record | ( | ) |
Convenience method for accessing a record CValue as CValueRecord.
Only valid for records.
Reimplemented in org.jmodelica.modelica.compiler.CValueRecord.
| boolean org.jmodelica.modelica.compiler.CValue.reduceBoolean | ( | ) |
Reduce an array of constant boolean values to a single boolean.
Used for the test expression of while statements. For scalar constant values, just returns the boolean value.
Reimplemented in org.jmodelica.modelica.compiler.CValueArray.
| Size org.jmodelica.modelica.compiler.CValue.size | ( | ) |
Returns the array size of this constant value.
Reimplemented in org.jmodelica.modelica.compiler.CValueArray.
| String org.jmodelica.modelica.compiler.CValue.stringValue | ( | ) |
Convert to string, default implementation.
Reimplemented in org.jmodelica.modelica.compiler.CValueBoolean, org.jmodelica.modelica.compiler.CValueEnum, org.jmodelica.modelica.compiler.CValueInteger, org.jmodelica.modelica.compiler.CValueReal, and org.jmodelica.modelica.compiler.CValueString.
| String org.jmodelica.modelica.compiler.CValue.toString | ( | ) |
Overloading of the toString() method.
Reimplemented in org.jmodelica.modelica.compiler.CValueArray, org.jmodelica.modelica.compiler.CValueEnum, org.jmodelica.modelica.compiler.CValueRecord, and org.jmodelica.modelica.compiler.CValueUnknown.
| CValue org.jmodelica.modelica.compiler.CValue.valueXML | ( | ) |
Reimplemented in org.jmodelica.modelica.compiler.CValueEnum.
final CValue org.jmodelica.modelica.compiler.CValue.UNKNOWN = new CValueUnknown() [static] |
An unknown value.
final CValue org.jmodelica.modelica.compiler.CValue.UNSUPPORTED = new CValueUnsupported() [static] |
An unknown value for an expression that constant evaluation isn't supported for.
1.5.8