NotCondExpression Class Reference

Represents XQuery standard function fn:not. More...

#include <notcondexpression.h>

Inheritance diagram for NotCondExpression:

Inheritance graph
[legend]
Collaboration diagram for NotCondExpression:

Collaboration graph
[legend]

List of all members.

Public Member Functions

 NotCondExpression (CondExpression *_exp)
 Constructor.
virtual ~NotCondExpression ()
virtual void scopeCheck (vector< unsigned > &def_vars, vector< unsigned > &introduced_vars, vector< unsigned > &violating_vars)
virtual void replaceVarId (unsigned old_id, unsigned new_id)
virtual void extractFSAMap (FSAMap *fsamap, unsigned parent_var)
virtual void extractParVarMap (ParVarMap *parvarmap)
virtual void extractDependencies (vector< DependencySet * > *depset)
virtual ExpressionplaceSignOffs (vector< SignOffExpression * > &signoffs)
virtual void rewriteEmptyFuncts ()
virtual void rewriteVarstepCondExps ()
virtual void rewriteAggregateFuncts ()
virtual void print (OutputStream &dos) const
virtual void init (BufferNode *root)
virtual void eval (OutputStream &eos, Environment *env, unsigned modus)
virtual bool evalCond (OutputStream &eos, Environment *env, unsigned modus)

Private Attributes

CondExpressionexp
 The entered CondExpression.


Detailed Description

Represents XQuery standard function fn:not.

Represents XQuery standard function fn:not, which takes a CondExpression, e.g. fn:not(fn:false()) or fn:not(fn:count($x) < 3), as argument and returns the negotiation of the entered CondExpression.

Author:
Michael Schmidt

Gunnar Jehl

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

Definition at line 50 of file notcondexpression.h.


Constructor & Destructor Documentation

NotCondExpression::NotCondExpression ( CondExpression _exp  ) 

Constructor.

Constructor - creating object for a CondExpression.

Parameters:
[in] _exp Pointer to a CondExpression object.

Definition at line 37 of file notcondexpression.cpp.

NotCondExpression::~NotCondExpression (  )  [virtual]

Destructor.

Definition at line 41 of file notcondexpression.cpp.

References exp.


Member Function Documentation

void NotCondExpression::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.

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.

Definition at line 94 of file notcondexpression.cpp.

References Expression::eval(), EVAL_SIGNOFF, and exp.

Referenced by EmptyCondExpression::eval().

bool NotCondExpression::evalCond ( OutputStream eos,
Environment env,
unsigned  modus 
) [virtual]

Evaluates the corresponding CondExpression.

Evaluates the corresponding CondExpression.

Parameters:
[in] eos Pointer to a OutputStream object.
[in] env Pointer to a Environment object.
[in] modus Evaluation modus.
Return values:
bool true if the corresponding CondExpression is true, false otherwise.
Exceptions:
RuntimeException If illegal evaluation mode (argument: unsigned modus).

Implements CondExpression.

Definition at line 111 of file notcondexpression.cpp.

References CondExpression::evalCond(), and exp.

Referenced by EmptyCondExpression::evalCond().

void NotCondExpression::extractDependencies ( vector< DependencySet * > *  depset  )  [virtual]

Extracts the needed dependencies of a query.

Extracts the needed dependencies of a query, which are needed for constructing the ProjectionTree.

Parameters:
[in,out] depset Pointer to a vector containing Pointer to DependencySet objects.
Return values:
void 

Reimplemented from Expression.

Definition at line 63 of file notcondexpression.cpp.

References exp, and Expression::extractDependencies().

Referenced by EmptyCondExpression::extractDependencies().

void NotCondExpression::extractFSAMap ( FSAMap fsamap,
unsigned  parent_var 
) [virtual]

Extracts the needed first straight ancestor (FSA) variables map.

Extracts the needed first straight ancestor (FSA) variables map, which is needed for correct insertion of SignOffExpression.

Parameters:
[in,out] fsamap Pointer to a FSAMap object.
[in] parent_var Parent variable.
Return values:
void 

Reimplemented from Expression.

Definition at line 55 of file notcondexpression.cpp.

References exp, and Expression::extractFSAMap().

Referenced by EmptyCondExpression::extractFSAMap().

void NotCondExpression::extractParVarMap ( ParVarMap parvarmap  )  [virtual]

Extracts the needed parent variable (ParVar) map.

Extracts the needed parent variable (ParVar) map, which is needed for constructing the VariableTree.

Parameters:
[in,out] parvarmap Pointer to a ParVarMap object.
Return values:
void 

Reimplemented from Expression.

Definition at line 59 of file notcondexpression.cpp.

References exp, and Expression::extractParVarMap().

Referenced by EmptyCondExpression::extractParVarMap().

void NotCondExpression::init ( BufferNode root  )  [virtual]

Initializes the query for evaluation.

Initializes the query for evaluation. Up to now only all required BufferIterator objects are created to speed up query evaluation.

Parameters:
[in] root Pointer to a BufferNode object.
Return values:
void 

Reimplemented from Expression.

Definition at line 90 of file notcondexpression.cpp.

References exp, and Expression::init().

Referenced by EmptyCondExpression::init().

Expression * NotCondExpression::placeSignOffs ( vector< SignOffExpression * > &  signoffs  )  [virtual]

Places all signOff-statements in the corresponding query.

Places all signOff-statements in the corresponding query, which are needed for active garbage collection by removing Role from the BufferNode.

Parameters:
[in] signoffs Pointer to a vector containing Pointer to SignOffExpression objects.
Return values:
Expression* Pointer to a Expression object (following expression in the corresponding query).

Reimplemented from Expression.

Definition at line 67 of file notcondexpression.cpp.

References exp, and Expression::placeSignOffs().

Referenced by EmptyCondExpression::placeSignOffs().

void NotCondExpression::print ( OutputStream dos  )  const [virtual]

Prints the expression.

Prints the expression.

Parameters:
[in] dos Pointer to a OutputStream object.
Return values:
void 

Implements Expression.

Definition at line 86 of file notcondexpression.cpp.

void NotCondExpression::replaceVarId ( unsigned  old_id,
unsigned  new_id 
) [virtual]

Replaces all matching variable IDs by a new one.

Replaces all matching variable IDs by a new one, which is needed in case of calling method rewriteVarsteps().

Parameters:
[in] old_id Old variable ID.
[in] new_id New variable ID, which should be introduced instead.
Return values:
void 

Reimplemented from Expression.

Definition at line 51 of file notcondexpression.cpp.

References exp, and Expression::replaceVarId().

void NotCondExpression::rewriteAggregateFuncts (  )  [virtual]

Rewrites all arguments of all aggregate functions into an equivalent for-clause (with return-clause).

Rewrites all arguments of all aggregate functions into an equivalent for-clause (with return-clause).

Return values:
void 

Reimplemented from Expression.

Definition at line 82 of file notcondexpression.cpp.

References exp, and Expression::rewriteAggregateFuncts().

Referenced by EmptyCondExpression::rewriteAggregateFuncts().

void NotCondExpression::rewriteEmptyFuncts (  )  [virtual]

Rewrites all fn:empty XQuery functions into equivalent fn:not(fn:exists) XQuery functions.

Rewrites all fn:empty XQuery functions into equivalent fn:not(fn:exists) XQuery functions.

Return values:
void 

Reimplemented from Expression.

Definition at line 74 of file notcondexpression.cpp.

References exp, and Expression::rewriteEmptyFuncts().

void NotCondExpression::rewriteVarstepCondExps (  )  [virtual]

Rewrites all if($x) if-conditions into equivalent if(fn:not(fn:empty($x))) XQuery expressions.

Rewrites all if($x) if-conditions into equivalent if(fn:not(fn:empty($x))) XQuery expressions.

Return values:
void 

Reimplemented from Expression.

Definition at line 78 of file notcondexpression.cpp.

References exp, and Expression::rewriteVarstepCondExps().

void NotCondExpression::scopeCheck ( vector< unsigned > &  def_vars,
vector< unsigned > &  introduced_vars,
vector< unsigned > &  violating_vars 
) [virtual]

Returns if all used variables were previously (through a for-clause) defined or if a variable leaves their defined scope.

Returns if all used variables were previously (through a for-clause) defined or if a variable leaves their defined scope.

Parameters:
[in] def_vars Vector containing all previously defined variables.
[in] introduced_vars Vector containing all up to this expression defined variables.
[in] violating_vars Vector containing all variables which violates the scope condition.
Return values:
void 

Reimplemented from Expression.

Definition at line 45 of file notcondexpression.cpp.

References exp, and Expression::scopeCheck().


Member Data Documentation


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