Templates

Templates. More...

Functions

template<class T>
void evaluate_operands (T *o)
 Evaluates the operands of a CASObject.
template<class T>
void expand_operands (T *o)
 Expands the operands of a CASObject.
template<class T>
void resolve_parentheses (CASObject *o)
 Friend for resolving parentheses.

Detailed Description

Templates used in ECAS.

Function Documentation

template<class T>
void evaluate_operands ( T *  o  ) 

Note:
This template expects to be a friend of the class it evaluates the operands.
Evaluates the operands of a CASObject by using std::transform on the operands vector. The newly created operands vector replaces the old one.

Parameters:
o Pointer to the CASObject whose operands have to be evaluated.
Returns:
void.

Definition at line 177 of file castemplates.h.

template<class T>
void expand_operands ( T *  o  ) 

Note:
This template expects to be a friend of the class it expands the operands.
Expands the operands of a CASObject by using std::transform on the operands vector. The newly created operans vector replaces the old one.

Parameters:
o Pointer to the CASObjet whose operands have to be evaluated.
Returns:
void.

Definition at line 215 of file castemplates.h.

template<class T>
void resolve_parentheses ( CASObject o  ) 

Note:
This template expects to be a friend of the class it resolves the parentheses.
Used to resolve parentheses of a certain type specified by the parameter T. The parameter T is used to determine when to stop parenthese resolution, e.g. if T specifies a Sum, the resolution is stopped when another type as Sum is encountered.

Resolving parentheses is done in the following manner:

It loops thru all operands of the CASObject and checks if they are of the same type as the object itself, if so, it appends their operands to the operands list of the object.

Parameters:
o Pointer to a CASObject of which the parentheses have to be resolved.
Returns:
void.

Definition at line 86 of file castemplates.h.


Generated on Sun Dec 31 01:57:29 2006 for ECAS by  doxygen 1.4.7