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

CCM::StringExpr Class Reference

Inheritance diagram for CCM::StringExpr:

CCM::Expr List of all members.

Detailed Description

String type expression.


Public Types

enum  Op {
  LITERAL, ID, CALL, CONCAT,
  ASSIGN, ELEMENT, SETELEMENT
}
 Possible operations. More...


Public Member Functions

 StringExpr (string lit)
 Create a literal expression with given value.

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

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

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

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

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

 StringExpr (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
string value


Member Enumeration Documentation

enum CCM::StringExpr::Op
 

Possible operations.

Enumeration values:
LITERAL 
ID 
CALL 
CONCAT 
ASSIGN 
ELEMENT 
SETELEMENT 


Constructor & Destructor Documentation

CCM::StringExpr::StringExpr string  lit  ) 
 

Create a literal expression with given value.

CCM::StringExpr::StringExpr Ref  id  ) 
 

Create a variable / stub property reference expression.

CCM::StringExpr::StringExpr Ref  id,
Expr  e
 

Create assignment expression.

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

CCM::StringExpr::StringExpr Ref  method,
List  args
 

Create method call expression to method(args).

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

Create array element access expression to array[index].

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

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

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

Create binary expression.


Member Function Documentation

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

Evaluate expression and return its value.

Stub access expressions add transitions to the currently evaluated process.

Implements CCM::Expr.

override Expr CCM::StringExpr::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::StringExpr::ToString  ) 
 

override Type CCM::StringExpr::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::StringExpr::op [private]
 

string CCM::StringExpr::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