#include <stringconstexpression.h>
Public Member Functions | |
StringConstExpression (const char *_str) | |
Constructor. | |
virtual | ~StringConstExpression () |
void | print (OutputStream &dos) const |
void | eval (OutputStream &eos, Environment *env, unsigned modus) |
virtual Value * | getNextValue () |
Private Attributes | |
const char * | str |
The entered string. |
Represents an XQuery string value, e.g. "foo"
, which takes therefore a string as argument and returns this string.
Definition at line 50 of file stringconstexpression.h.
StringConstExpression::StringConstExpression | ( | const char * | _str | ) |
Constructor.
Constructor - creating object for a string.
[in] | _str | Pointer to a char object. |
Definition at line 38 of file stringconstexpression.cpp.
References str.
StringConstExpression::~StringConstExpression | ( | ) | [virtual] |
void StringConstExpression::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 63 of file stringconstexpression.cpp.
References EVAL_QUERY, EVAL_SIGNOFF, and str.
Value * StringConstExpression::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 84 of file stringconstexpression.cpp.
References OperandExpression::cur_val, OperandExpression::initial, Value::setStrVal(), and str.
void StringConstExpression::print | ( | OutputStream & | dos | ) | const [virtual] |
Prints the expression.
Prints the expression.
[in] | dos | Pointer to a OutputStream object. |
void |
Implements Expression.
Definition at line 59 of file stringconstexpression.cpp.
References str.
const char * StringConstExpression::str [private] |
The entered string.
The entered string, which is the argument of the constructor.
Definition at line 84 of file stringconstexpression.h.
Referenced by eval(), getNextValue(), print(), StringConstExpression(), and ~StringConstExpression().