
Public Member Functions | |
| CValueRecord (FRecordType type) | |
| Create a new record constant value for the described record. | |
| boolean | isRecord () |
| Check if this is a record. | |
| CValueRecord | record () |
| Convenience method for accessing a record CValue as CValueRecord. | |
| void | setMember (String name, CValue val) |
| Set the value of a specific member of a record constant value. | |
| void | setMember (int i, CValue val) |
| Set the value of a specific member of a record constant value. | |
| CValue | getMember (String name) |
| Get the value of a specific member of a record constant value. | |
| CValue | getMember (int i) |
| Get the value of a specific member of a record constant value. | |
| String | toString () |
| Overloading of the toString() method. | |
| FExp | buildLiteral () |
| Create a literal AST node from constant. | |
Protected Member Functions | |
| int | index (String name) |
| Get the internal index for a given member. | |
Protected Attributes | |
| String | name |
| String[] | members |
| CValue[] | values |
Note that this class is mutable, care must be taken not to modify records 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.CValueRecord.CValueRecord | ( | FRecordType | type | ) |
Create a new record constant value for the described record.
| type | the FRecordType describing the record |
| FExp org.jmodelica.modelica.compiler.CValueRecord.buildLiteral | ( | ) |
Create a literal AST node from constant.
Reimplemented from org.jmodelica.modelica.compiler.CValue.
| CValue org.jmodelica.modelica.compiler.CValueRecord.getMember | ( | int | i | ) |
Get the value of a specific member of a record constant value.
| i | the zero-based index of the member, according to the order in the record declaration |
| CValue org.jmodelica.modelica.compiler.CValueRecord.getMember | ( | String | name | ) |
Get the value of a specific member of a record constant value.
| int org.jmodelica.modelica.compiler.CValueRecord.index | ( | String | name | ) | [protected] |
Get the internal index for a given member.
| boolean org.jmodelica.modelica.compiler.CValueRecord.isRecord | ( | ) |
| CValueRecord org.jmodelica.modelica.compiler.CValueRecord.record | ( | ) |
Convenience method for accessing a record CValue as CValueRecord.
Only valid for records.
Reimplemented from org.jmodelica.modelica.compiler.CValue.
| void org.jmodelica.modelica.compiler.CValueRecord.setMember | ( | int | i, | |
| CValue | val | |||
| ) |
Set the value of a specific member of a record constant value.
| i | the zero-based index of the member, according to the order in the record declaration |
| void org.jmodelica.modelica.compiler.CValueRecord.setMember | ( | String | name, | |
| CValue | val | |||
| ) |
Set the value of a specific member of a record constant value.
| String org.jmodelica.modelica.compiler.CValueRecord.toString | ( | ) |
Overloading of the toString() method.
Reimplemented from org.jmodelica.modelica.compiler.CValue.
String [] org.jmodelica.modelica.compiler.CValueRecord.members [protected] |
String org.jmodelica.modelica.compiler.CValueRecord.name [protected] |
CValue [] org.jmodelica.modelica.compiler.CValueRecord.values [protected] |
1.5.8