ConstExpression Class Reference

Represents base class of all constant (numeric or string) expressions. More...

#include <constexpression.h>

Inheritance diagram for ConstExpression:

Inheritance graph
[legend]
Collaboration diagram for ConstExpression:

Collaboration graph
[legend]

List of all members.

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 ValuegetNextValue ()=0


Detailed Description

Represents base class of all constant (numeric or string) expressions.

Represents base class of all constant (numeric or string) expressions.

Author:
Michael Schmidt

Gunnar Jehl

Version:
2.1
License:
Software License Agreement (BSD License)

Definition at line 49 of file constexpression.h.


Constructor & Destructor Documentation

ConstExpression::ConstExpression ( EXP_TYPE  _type  ) 

Constructor.

Constructor - creating object for an EXP_TYPE.

Parameters:
[in] _type EXP_TYPE.

Definition at line 37 of file constexpression.cpp.

ConstExpression::~ConstExpression (  )  [virtual]

Destructor.

Definition at line 42 of file constexpression.cpp.


Member Function Documentation

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.

Parameters:
[in] eos Pointer to a OutputStream object.
[in] env Pointer to an Environment object.
[in] modus The query evaluation mode.
Exceptions:
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.

Return values:
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.

Return values:
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.

Parameters:
[in] eos Pointer to a OutputStream object.
[in] env Pointer to a Environment object.
[in] modus Evaluation modus.
Return values:
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.

Return values:
void 

Implements OperandExpression.

Definition at line 85 of file constexpression.h.

References OperandExpression::initial.


Generated on Sun May 24 20:20:22 2009 for G(arbage) C(ollected) X(Query) Engine by  doxygen 1.5.9