#include <numericconstexpression.h>
Public Member Functions | |
NumericConstExpression (const char *_num) | |
Constructor. | |
virtual | ~NumericConstExpression () |
void | print (OutputStream &dos) const |
void | eval (OutputStream &eos, Environment *env, unsigned modus) |
virtual Value * | getNextValue () |
Private Attributes | |
long double | num |
The entered numeric value. |
Represents an XQuery numeric value, e.g. 3
, which takes therefore a numeric value as argument and returns this (numeric) value.
Definition at line 49 of file numericconstexpression.h.
NumericConstExpression::NumericConstExpression | ( | const char * | _num | ) |
Constructor.
Constructor - creating object for a string (numeric value), which will be casted to a numeric value.
[in] | _num | Pointer to a char object. |
Definition at line 38 of file numericconstexpression.cpp.
NumericConstExpression::~NumericConstExpression | ( | ) | [virtual] |
Destructor.
Definition at line 43 of file numericconstexpression.cpp.
void NumericConstExpression::eval | ( | OutputStream & | eos, | |
Environment * | env, | |||
unsigned | modus | |||
) | [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. |
Implements ConstExpression.
Definition at line 50 of file numericconstexpression.cpp.
References EVAL_QUERY, EVAL_SIGNOFF, and num.
Value * NumericConstExpression::getNextValue | ( | ) | [virtual] |
Returns the next value of the operand.
Returns the next value of the operand for iteration.
Value* | Pointer to a Value object. |
Implements ConstExpression.
Definition at line 71 of file numericconstexpression.cpp.
References OperandExpression::cur_val, OperandExpression::initial, num, and Value::setNumVal().
void NumericConstExpression::print | ( | OutputStream & | dos | ) | const [virtual] |
Prints the expression.
Prints the expression.
[in] | dos | Pointer to a OutputStream object. |
void |
Implements Expression.
Definition at line 46 of file numericconstexpression.cpp.
References num.
long double NumericConstExpression::num [private] |
The entered numeric value.
The entered numeric value, which was (after casting) the argument of the constructor.
Definition at line 85 of file numericconstexpression.h.
Referenced by eval(), getNextValue(), and print().