Main Page | Namespace List | Class Hierarchy | Class List | File List | Class Members

CCM::IntExpr Class Reference

Inheritance diagram for CCM::IntExpr:

CCM::Expr List of all members.

Detailed Description

Integer typ expression.


Public Types

enum  Op {
  LITERAL, ID, CALL, ELEMENT,
  SETELEMENT, TILDE, NEG, ADD,
  SUB, MUL, DIV, MOD,
  SHL, SHR, AND, XOR,
  OR, ASSIGN
}
 Possible operations. More...


Public Member Functions

 IntExpr (int lit)
 Create a literal expression with given value.

 IntExpr (Ref id)
 Create a variable / stub property reference expression.

 IntExpr (Ref id, Expr e)
 Create assignment expression.

 IntExpr (Ref method, List args)
 Create method call expression to method(args).

 IntExpr (ArrayExpr array, IntExpr index)
 Create array element access expression to array[index].

 IntExpr (ArrayExpr array, IntExpr index, Expr value)
 Create array element assignment expression: array[index] = value.

 IntExpr (Op op, Expr e)
 Create unary expression.

 IntExpr (Op op, Expr e1, Expr e2)
 Create binary expression.

override Type type ()
 Return the expression type.

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
int value


Member Enumeration Documentation

enum CCM::IntExpr::Op
 

Possible operations.

Enumeration values:
LITERAL 
ID 
CALL 
ELEMENT 
SETELEMENT 
TILDE 
NEG 
ADD 
SUB 
MUL 
DIV 
MOD 
SHL 
SHR 
AND 
XOR 
OR 
ASSIGN 


Constructor & Destructor Documentation

CCM::IntExpr::IntExpr int  lit  ) 
 

Create a literal expression with given value.

CCM::IntExpr::IntExpr Ref  id  ) 
 

Create a variable / stub property reference expression.

CCM::IntExpr::IntExpr Ref  id,
Expr  e
 

Create assignment expression.

Parameters:
id Reference to assign to
e Expression to assign to id

CCM::IntExpr::IntExpr Ref  method,
List  args
 

Create method call expression to method(args).

CCM::IntExpr::IntExpr ArrayExpr  array,
IntExpr  index
 

Create array element access expression to array[index].

CCM::IntExpr::IntExpr ArrayExpr  array,
IntExpr  index,
Expr  value
 

Create array element assignment expression: array[index] = value.

CCM::IntExpr::IntExpr Op  op,
Expr  e
 

Create unary expression.

CCM::IntExpr::IntExpr Op  op,
Expr  e1,
Expr  e2
 

Create binary expression.


Member Function Documentation

override Object CCM::IntExpr::eval  )  [virtual]
 

Evaluate expression and return its value.

Stub access expressions add transitions to the currently evaluated process.

Implements CCM::Expr.

override Expr CCM::IntExpr::makeElementAssign Expr  value  )  [virtual]
 

Return an expression that assigns value to the element if called on an array element access expression.

Implements CCM::Expr.

override string CCM::IntExpr::ToString  ) 
 

override Type CCM::IntExpr::type  )  [virtual]
 

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.


Member Data Documentation

Op CCM::IntExpr::op [private]
 

int CCM::IntExpr::value [private]
 


The documentation for this class was generated from the following file:
Generated on Mon Jun 21 01:20:50 2004 for cs2ccmb by doxygen 1.3.7