#include <constexpression.h>
Public Member Functions | |
ConstExpression (EXP_TYPE _type) | |
Constructor. | |
virtual | ~ConstExpression () |
virtual void | eval (OutputStream &eos, Environment *env, unsigned modus)=0 |
bool | isSingleValued () |
void | prepareOperand (OutputStream &eos, Environment *env, unsigned modus) |
void | unprepareOperand () |
virtual Value * | getNextValue ()=0 |
Represents base class of all constant (numeric or string) expressions.
Definition at line 49 of file constexpression.h.
ConstExpression::ConstExpression | ( | EXP_TYPE | _type | ) |
Constructor.
Constructor - creating object for an EXP_TYPE.
[in] | _type | EXP_TYPE. |
Definition at line 37 of file constexpression.cpp.
ConstExpression::~ConstExpression | ( | ) | [virtual] |
Destructor.
Definition at line 42 of file constexpression.cpp.
void ConstExpression::eval | ( | OutputStream & | eos, | |
Environment * | env, | |||
unsigned | modus | |||
) | [pure virtual] |
Evaluates the expression in the given environment.
Evaluates the expression in the given environment. The evaluation takes place in the environment that is passed to this method. In addition, the parameter modus is one of the following: EVAL_QUERY, EVAL_QUERY_SILENT or EVAL_SIGNOFF (see also the corresponding defines for more information). This method implements the XQuery semantics for the standard expression types, but also the GCX specific extensions like signOff-statements.
[in] | eos | Pointer to a OutputStream object. |
[in] | env | Pointer to an Environment object. |
[in] | modus | The query evaluation mode. |
RuntimeException | If illegal evaluation mode. |
Reimplemented from Expression.
Implemented in NumericConstExpression, and StringConstExpression.
Value * ConstExpression::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. |
Implements OperandExpression.
Implemented in NumericConstExpression, and StringConstExpression.
bool ConstExpression::isSingleValued | ( | ) | [inline, 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. |
Implements OperandExpression.
Definition at line 72 of file constexpression.h.
void ConstExpression::prepareOperand | ( | OutputStream & | eos, | |
Environment * | env, | |||
unsigned | modus | |||
) | [inline, 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 |
Implements OperandExpression.
Definition at line 77 of file constexpression.h.
void ConstExpression::unprepareOperand | ( | ) | [inline, virtual] |
Resets the operand if necessary.
Resets the operand if necessary.
void |
Implements OperandExpression.
Definition at line 85 of file constexpression.h.
References OperandExpression::initial.