<, <=, >=, >, = or !=.  
More...
#include <condoperandexpression.h>


| Public Member Functions | |
| CondOperandExpression (OperandExpression *_left, COMP_TYPE _op, OperandExpression *_right) | |
| Constructor. | |
| virtual | ~CondOperandExpression () | 
| virtual void | scopeCheck (vector< unsigned > &def_vars, vector< unsigned > &introduced_vars, vector< unsigned > &violating_vars) | 
| virtual void | replaceVarId (unsigned old_id, unsigned new_id) | 
| virtual void | extractFSAMap (FSAMap *fsamap, unsigned parent_var) | 
| virtual void | extractParVarMap (ParVarMap *parvarmap) | 
| virtual void | extractDependencies (vector< DependencySet * > *depset) | 
| virtual Expression * | placeSignOffs (vector< SignOffExpression * > &signoffs) | 
| virtual void | rewriteEmptyFuncts () | 
| virtual void | rewriteVarstepCondExps () | 
| virtual void | rewriteAggregateFuncts () | 
| virtual void | print (OutputStream &dos) const | 
| virtual void | init (BufferNode *root) | 
| virtual bool | evalCond (OutputStream &eos, Environment *env, unsigned modus) | 
| Private Member Functions | |
| bool | evalRelOp (Value *left, COMP_TYPE op, Value *right) | 
| Evaluates the two entered Value objects with respect to the entered COMP_TYPE. | |
| COMP_TYPE | invertOperator (COMP_TYPE ot) | 
| Inverts the entered COMP_TYPE. | |
| Private Attributes | |
| OperandExpression * | left | 
| The entered OperandExpression on the left hand side of the entered COMP_TYPE. | |
| COMP_TYPE | op | 
| The entered COMP_TYPE between the two entered OperandExpression. | |
| OperandExpression * | right | 
| The entered OperandExpression on the right hand side of the entered COMP_TYPE. | |
<, <=, >=, >, = or !=. 
Represents XQuery comparison of two operands with relational operators <, <=, >=, >, = or !=, which takes therefore two OperandExpression, e.g. $x/bib/book, "foo" or fn:count($x), and a COMP_TYPE, e.g. = or !=, as arguments and returns the evaluated value of the two OperandExpression with respect to COMP_TYPE, i.e. returns true if the two OperandExpression are in correct relationship to the COMP_TYPE, false otherwise. 
Definition at line 56 of file condoperandexpression.h.
| CondOperandExpression::CondOperandExpression | ( | OperandExpression * | _left, | |
| COMP_TYPE | _op, | |||
| OperandExpression * | _right | |||
| ) | 
Constructor.
Constructor - creating object for a COMP_TYPE and two OperandExpression.
| [in] | _left | Pointer to a OperandExpression object. | 
| [in] | _op | COMP_TYPE. | 
| [in] | _right | Pointer to a OperandExpression object. | 
Definition at line 38 of file condoperandexpression.cpp.
| CondOperandExpression::~CondOperandExpression | ( | ) |  [virtual] | 
| bool CondOperandExpression::evalCond | ( | OutputStream & | eos, | |
| Environment * | env, | |||
| unsigned | modus | |||
| ) |  [virtual] | 
Evaluates the corresponding CondExpression.
Evaluates the corresponding CondExpression.
| [in] | eos | Pointer to a OutputStream object. | 
| [in] | env | Pointer to a Environment object. | 
| [in] | modus | Evaluation modus. | 
| bool | trueif the corresponding CondExpression istrue,falseotherwise. | 
| RuntimeException | If illegal evaluation mode (argument: unsigned modus). | 
Implements CondExpression.
Definition at line 135 of file condoperandexpression.cpp.
References EVAL_QUERY, EVAL_SIGNOFF, evalRelOp(), OperandExpression::getNextValue(), invertOperator(), OperandExpression::isSingleValued(), left, op, OperandExpression::prepareOperand(), right, and OperandExpression::unprepareOperand().
Evaluates the two entered Value objects with respect to the entered COMP_TYPE.
Evaluates the two entered Value objects with respect to the entered COMP_TYPE to true or false. 
| [in] | left | Pointer to a Value object. | 
| [in] | op | COMP_TYPE. | 
| [in] | right | Pointer to a Value object. | 
| bool | trueif the two Value objects are in correct relationship with respect to the entered COMP_TYPE,falseotherwise. | 
Definition at line 199 of file condoperandexpression.cpp.
References Value::getNumVal(), Value::getStrVal(), and Value::type.
Referenced by evalCond().
| void CondOperandExpression::extractDependencies | ( | vector< DependencySet * > * | depset | ) |  [virtual] | 
Extracts the needed dependencies of a query.
Extracts the needed dependencies of a query, which are needed for constructing the ProjectionTree.
| [in,out] | depset | Pointer to a vector containing Pointer to DependencySet objects. | 
| void | 
Reimplemented from Expression.
Definition at line 75 of file condoperandexpression.cpp.
References Expression::extractDependencies(), left, and right.
| void CondOperandExpression::extractFSAMap | ( | FSAMap * | fsamap, | |
| unsigned | parent_var | |||
| ) |  [virtual] | 
Extracts the needed first straight ancestor (FSA) variables map.
Extracts the needed first straight ancestor (FSA) variables map, which is needed for correct insertion of SignOffExpression.
| [in,out] | fsamap | Pointer to a FSAMap object. | 
| [in] | parent_var | Parent variable. | 
| void | 
Reimplemented from Expression.
Definition at line 65 of file condoperandexpression.cpp.
References Expression::extractFSAMap(), left, and right.
| void CondOperandExpression::extractParVarMap | ( | ParVarMap * | parvarmap | ) |  [virtual] | 
Extracts the needed parent variable (ParVar) map.
Extracts the needed parent variable (ParVar) map, which is needed for constructing the VariableTree.
| [in,out] | parvarmap | Pointer to a ParVarMap object. | 
| void | 
Reimplemented from Expression.
Definition at line 70 of file condoperandexpression.cpp.
References Expression::extractParVarMap(), left, and right.
| void CondOperandExpression::init | ( | BufferNode * | root | ) |  [virtual] | 
Initializes the query for evaluation.
Initializes the query for evaluation. Up to now only all required BufferIterator objects are created to speed up query evaluation.
| [in] | root | Pointer to a BufferNode object. | 
| void | 
Reimplemented from Expression.
Definition at line 130 of file condoperandexpression.cpp.
References Expression::init(), left, and right.
Inverts the entered COMP_TYPE.
Inverts the entered COMP_TYPE, e.g. < results in >. 
| [in] | ot | COMP_TYPE. | 
| COMP_TYPE | The inverted COMP_TYPE of the original one. | 
Definition at line 239 of file condoperandexpression.cpp.
Referenced by evalCond().
| Expression * CondOperandExpression::placeSignOffs | ( | vector< SignOffExpression * > & | signoffs | ) |  [virtual] | 
Places all signOff-statements in the corresponding query.
Places all signOff-statements in the corresponding query, which are needed for active garbage collection by removing Role from the BufferNode.
| [in] | signoffs | Pointer to a vector containing Pointer to SignOffExpression objects. | 
| Expression* | Pointer to a Expression object (following expression in the corresponding query). | 
Reimplemented from Expression.
Definition at line 81 of file condoperandexpression.cpp.
References left, Expression::placeSignOffs(), and right.
| void CondOperandExpression::print | ( | OutputStream & | dos | ) | const  [virtual] | 
Prints the expression.
Prints the expression.
| [in] | dos | Pointer to a OutputStream object. | 
| void | 
Implements Expression.
Definition at line 105 of file condoperandexpression.cpp.
References op.
| void CondOperandExpression::replaceVarId | ( | unsigned | old_id, | |
| unsigned | new_id | |||
| ) |  [virtual] | 
Replaces all matching variable IDs by a new one.
Replaces all matching variable IDs by a new one, which is needed in case of calling method rewriteVarsteps().
| [in] | old_id | Old variable ID. | 
| [in] | new_id | New variable ID, which should be introduced instead. | 
| void | 
Reimplemented from Expression.
Definition at line 60 of file condoperandexpression.cpp.
References left, Expression::replaceVarId(), and right.
| void CondOperandExpression::rewriteAggregateFuncts | ( | ) |  [virtual] | 
Rewrites all arguments of all aggregate functions into an equivalent for-clause (with return-clause).
Rewrites all arguments of all aggregate functions into an equivalent for-clause (with return-clause).
| void | 
Reimplemented from Expression.
Definition at line 100 of file condoperandexpression.cpp.
References left, Expression::rewriteAggregateFuncts(), and right.
| void CondOperandExpression::rewriteEmptyFuncts | ( | ) |  [virtual] | 
Rewrites all fn:empty XQuery functions into equivalent fn:not(fn:exists) XQuery functions. 
Rewrites all fn:empty XQuery functions into equivalent fn:not(fn:exists) XQuery functions. 
| void | 
Reimplemented from Expression.
Definition at line 90 of file condoperandexpression.cpp.
References left, Expression::rewriteEmptyFuncts(), and right.
| void CondOperandExpression::rewriteVarstepCondExps | ( | ) |  [virtual] | 
Rewrites all if($x) if-conditions into equivalent if(fn:not(fn:empty($x))) XQuery expressions. 
Rewrites all if($x) if-conditions into equivalent if(fn:not(fn:empty($x))) XQuery expressions. 
| void | 
Reimplemented from Expression.
Definition at line 95 of file condoperandexpression.cpp.
References left, Expression::rewriteVarstepCondExps(), and right.
| void CondOperandExpression::scopeCheck | ( | vector< unsigned > & | def_vars, | |
| vector< unsigned > & | introduced_vars, | |||
| vector< unsigned > & | violating_vars | |||
| ) |  [virtual] | 
Returns if all used variables were previously (through a for-clause) defined or if a variable leaves their defined scope.
Returns if all used variables were previously (through a for-clause) defined or if a variable leaves their defined scope.
| [in] | def_vars | Vector containing all previously defined variables. | 
| [in] | introduced_vars | Vector containing all up to this expression defined variables. | 
| [in] | violating_vars | Vector containing all variables which violates the scope condition. | 
| void | 
Reimplemented from Expression.
Definition at line 53 of file condoperandexpression.cpp.
References left, right, and Expression::scopeCheck().
| OperandExpression * CondOperandExpression::left  [private] | 
The entered OperandExpression on the left hand side of the entered COMP_TYPE.
The entered OperandExpression on the left hand side of the entered COMP_TYPE, which is the first argument of the constructor.
Definition at line 162 of file condoperandexpression.h.
Referenced by evalCond(), extractDependencies(), extractFSAMap(), extractParVarMap(), init(), placeSignOffs(), replaceVarId(), rewriteAggregateFuncts(), rewriteEmptyFuncts(), rewriteVarstepCondExps(), scopeCheck(), and ~CondOperandExpression().
| COMP_TYPE CondOperandExpression::op  [private] | 
The entered COMP_TYPE between the two entered OperandExpression.
The entered COMP_TYPE between the two entered OperandExpression, which is the second argument of the constructor.
Definition at line 169 of file condoperandexpression.h.
Referenced by evalCond(), and print().
| OperandExpression * CondOperandExpression::right  [private] | 
The entered OperandExpression on the right hand side of the entered COMP_TYPE.
The entered OperandExpression on the right hand side of the entered COMP_TYPE, which is the third argument of the constructor.
Definition at line 176 of file condoperandexpression.h.
Referenced by evalCond(), extractDependencies(), extractFSAMap(), extractParVarMap(), init(), placeSignOffs(), replaceVarId(), rewriteAggregateFuncts(), rewriteEmptyFuncts(), rewriteVarstepCondExps(), scopeCheck(), and ~CondOperandExpression().
 1.5.9
 1.5.9