#include <operandexpression.h>
Public Member Functions | |
OperandExpression (EXP_TYPE _type, EXP_TYPE _op_type) | |
Constructor. | |
virtual | ~OperandExpression () |
virtual bool | isSingleValued ()=0 |
Returns if the result/iteration of the operand is a single value. | |
virtual void | prepareOperand (OutputStream &eos, Environment *env, unsigned modus)=0 |
Initializes the operand if necessary. | |
virtual void | unprepareOperand ()=0 |
Resets the operand if necessary. | |
virtual Value * | getNextValue ()=0 |
Returns the next value of the operand. | |
const EXP_TYPE | getOperandType () |
Returns the type of the operand. | |
Protected Attributes | |
EXP_TYPE | op_type |
The entered EXP_TYPE. | |
bool | initial |
Value | cur_val |
Represents base clase of all XQuery operands of a condition, i.e. represents a operand of a CondOperandExpression, which takes either a VarExpression, e.g. $x
, $z
or $root
, a VarStepExpression, e.g. $x/bib//book
or //node()/text()
, a AggregateFunctExpression, e.g. fn:count($x)
or fn:sum(/bib//book)
, a RoundingExpression, e.g. fn:avg(fn:sum(/bib//book))
or fn:round(fn:avg(/bib//book))
, or a ConstExpression, e.g. "foo"
or 8
, as argument and returns the evaluated value of the corresponding Expression.
Definition at line 54 of file operandexpression.h.
Constructor.
Constructor - creating object for two EXP_TYPE.
[in] | _type | EXP_TYPE. |
[in] | _op_type | EXP_TYPE. |
Definition at line 37 of file operandexpression.cpp.
OperandExpression::~OperandExpression | ( | ) | [virtual] |
Destructor.
Definition at line 43 of file operandexpression.cpp.
Value * OperandExpression::getNextValue | ( | ) | [pure virtual] |
Returns the next value of the operand.
Returns the next value of the operand for iteration.
Value* | Pointer to a Value object. |
Implemented in AggregateFunctExpression, ConstExpression, NumericConstExpression, RoundingExpression, StringConstExpression, VarExpression, and VarStepExpression.
Referenced by CondOperandExpression::evalCond().
const EXP_TYPE OperandExpression::getOperandType | ( | ) | [inline] |
Returns the type of the operand.
Returns the type of the operand.
const | EXP_TYPE EXP_TYPE. |
Definition at line 108 of file operandexpression.h.
References op_type.
bool OperandExpression::isSingleValued | ( | ) | [pure virtual] |
Returns if the result/iteration of the operand is a single value.
Returns if the result/iteration of the operand is a single value, e.g a AggregateFunctExpression returns a single value whereas a VarStepExpression may return more than one value.
bool | if the result/iteration is a single value, false otherwise. |
Implemented in AggregateFunctExpression, ConstExpression, RoundingExpression, VarExpression, and VarStepExpression.
Referenced by CondOperandExpression::evalCond().
void OperandExpression::prepareOperand | ( | OutputStream & | eos, | |
Environment * | env, | |||
unsigned | modus | |||
) | [pure virtual] |
Initializes the operand if necessary.
Initializes the operand if necessary.
[in] | eos | Pointer to a OutputStream object. |
[in] | env | Pointer to a Environment object. |
[in] | modus | Evaluation modus. |
void |
Implemented in AggregateFunctExpression, ConstExpression, RoundingExpression, VarExpression, and VarStepExpression.
Referenced by CondOperandExpression::evalCond().
void OperandExpression::unprepareOperand | ( | ) | [pure virtual] |
Resets the operand if necessary.
Resets the operand if necessary.
void |
Implemented in AggregateFunctExpression, ConstExpression, RoundingExpression, VarExpression, and VarStepExpression.
Referenced by CondOperandExpression::evalCond().
Value OperandExpression::cur_val [protected] |
Container for the result of the operand.
Definition at line 127 of file operandexpression.h.
Referenced by FunctTruncateExpression::eval(), FunctRoundHalfToEvenExpression::eval(), FunctRoundExpression::eval(), FunctFloorExpression::eval(), FunctCoverExpression::eval(), FunctCeilingExpression::eval(), FunctAbsExpression::eval(), AggregateFunctVarSampExpression::eval(), AggregateFunctVarPopExpression::eval(), AggregateFunctSumExpression::eval(), AggregateFunctStdDevSampExpression::eval(), AggregateFunctStdDevPopExpression::eval(), AggregateFunctMinExpression::eval(), AggregateFunctMedianExpression::eval(), AggregateFunctMaxExpression::eval(), AggregateFunctCountExpression::eval(), AggregateFunctAvgExpression::eval(), VarStepExpression::getNextValue(), VarExpression::getNextValue(), StringConstExpression::getNextValue(), RoundingExpression::getNextValue(), NumericConstExpression::getNextValue(), and AggregateFunctExpression::getNextValue().
bool OperandExpression::initial [protected] |
Indicator for method getNextValue() if first call/iteration.
Definition at line 121 of file operandexpression.h.
Referenced by StringConstExpression::getNextValue(), RoundingExpression::getNextValue(), NumericConstExpression::getNextValue(), AggregateFunctExpression::getNextValue(), RoundingExpression::unprepareOperand(), ConstExpression::unprepareOperand(), and AggregateFunctExpression::unprepareOperand().
EXP_TYPE OperandExpression::op_type [protected] |
The entered EXP_TYPE.
The entered EXP_TYPE, which is the second argument of the constructor.
Definition at line 115 of file operandexpression.h.
Referenced by getOperandType().