org.jmodelica.modelica.compiler.CValueRecord Class Reference

Constant value for record. More...

Inheritance diagram for org.jmodelica.modelica.compiler.CValueRecord:

org.jmodelica.modelica.compiler.CValue

List of all members.

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


Detailed Description

Constant value for record.

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


Constructor & Destructor Documentation

org.jmodelica.modelica.compiler.CValueRecord.CValueRecord ( FRecordType  type  ) 

Create a new record constant value for the described record.

Parameters:
type the FRecordType describing the record


Member Function Documentation

FExp org.jmodelica.modelica.compiler.CValueRecord.buildLiteral (  ) 

Create a literal AST node from constant.

Returns:
FRecordConstructor AST node containing literal expression nodes.

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.

Parameters:
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 (  ) 

Check if this is a record.

Reimplemented from org.jmodelica.modelica.compiler.CValue.

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.

Parameters:
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.

Returns:
The string.

Reimplemented from org.jmodelica.modelica.compiler.CValue.


Member Data Documentation


The documentation for this class was generated from the following file:

Generated on Fri Oct 7 14:49:35 2011 for JModelica.org by  doxygen 1.5.8