Inheritance diagram for CCM::ArrayExpr:
Public Types | |
enum | Op { LITERAL, NEW, ID, ASSIGN, ELEMENT, SETELEMENT } |
Possible operations. More... | |
Public Member Functions | |
ArrayExpr (Ref id, Type elemType) | |
Create a variable / stub property reference expression. | |
ArrayExpr (Type elemType, IntExpr size) | |
Create new expression: new elemType[size]. | |
ArrayExpr (Ref id, Expr e, Type elemType) | |
Create assignment expression. | |
ArrayExpr (List lit, Type elemType) | |
Create a literal expression with given value. | |
ArrayExpr (ArrayExpr array, IntExpr index) | |
Create array element access expression to array[index]. | |
ArrayExpr (ArrayExpr array, IntExpr index, Expr value) | |
Create array element assignment expression: array[index] = value. | |
override Type | type () |
Return the expression type. | |
Type | elementType () |
Return the type of contained elements. | |
Object | getElement (int index) |
Return the value of thisarray[index]. | |
void | setElement (int index, Object value) |
Set the value of thisarray[index] = value. | |
override Object | eval () |
Evaluate expression and return its value. | |
override Expr | makeElementAssign (Expr value) |
Return an expression that assigns value to the element if called on an array element access expression. | |
override string | ToString () |
Private Attributes | |
Op | op |
List | value |
Type | elemType |
|
Possible operations.
|
|
Create a variable / stub property reference expression.
|
|
Create new expression: new elemType[size].
|
|
Create assignment expression.
|
|
Create a literal expression with given value.
|
|
Create array element access expression to array[index].
|
|
Create array element assignment expression: array[index] = value.
|
|
Return the type of contained elements.
|
|
Evaluate expression and return its value. Stub access expressions add transitions to the currently evaluated process. Implements CCM::Expr. |
|
Return the value of thisarray[index].
|
|
Return an expression that assigns value to the element if called on an array element access expression.
Implements CCM::Expr. |
|
Set the value of thisarray[index] = value.
|
|
|
|
Return the expression type. This is generally the type of the expression value, not of the Expr itself (e. g. "int", not "IntExpr"). Implements CCM::Expr. |
|
|
|
|
|
|