#include <txExpr.h>
Public Types | |
| enum | ExprType { LOCATIONSTEP_EXPR, PATH_EXPR, UNION_EXPR, LITERAL_EXPR, OTHER_EXPR } |
| Returns the type of this expression. More... | |
| enum | { NODESET_RESULT = 0x01, BOOLEAN_RESULT = 0x02, NUMBER_RESULT = 0x04, STRING_RESULT = 0x08, RTF_RESULT = 0x10, ANY_RESULT = 0xFFFF } |
| enum | { NO_CONTEXT = 0x00, NODE_CONTEXT = 0x01, POSITION_CONTEXT = 0x02, SIZE_CONTEXT = 0x04, NODESET_CONTEXT = POSITION_CONTEXT | SIZE_CONTEXT, VARIABLES_CONTEXT = 0x08, PRIVATE_CONTEXT = 0x10, ANY_CONTEXT = 0xFFFF } |
| typedef PRUint16 | ResultType |
| Returns the type or types of results this Expr return. | |
| typedef PRUint16 | ContextSensitivity |
Public Member Functions | |
| Expr () | |
| virtual | ~Expr () |
| virtual nsresult | evaluate (txIEvalContext *aContext, txAExprResult **aResult)=0 |
| Evaluates this Expr based on the given context node and processor state. | |
| virtual ExprType | getType () |
| virtual ResultType | getReturnType ()=0 |
| PRBool | canReturnType (ResultType aType) |
| virtual PRBool | isSensitiveTo (ContextSensitivity aContexts)=0 |
| Returns true if this expression is sensitive to *any* of the requested contexts in aContexts. | |
| virtual Expr * | getSubExprAt (PRUint32 aPos)=0 |
| Returns sub-expression at given position. | |
| virtual void | setSubExprAt (PRUint32 aPos, Expr *aExpr)=0 |
| Replace sub-expression at given position. | |
| virtual nsresult | evaluateToBool (txIEvalContext *aContext, PRBool &aResult) |
| virtual nsresult | evaluateToString (txIEvalContext *aContext, nsString &aResult) |
| virtual void | toString (nsAString &str)=0 |
| Returns the String representation of this Expr. | |
Public Attributes | |
| u8 | op |
| char | affinity |
| u16 | flags |
| CollSeq * | pColl |
| Expr * | pLeft |
| Expr * | pRight |
| ExprList * | pList |
| Token | token |
| Token | span |
| int | iTable |
| int | iColumn |
| AggInfo * | pAggInfo |
| int | iAgg |
| int | iRightJoinTable |
| Select * | pSelect |
| Table * | pTab |
| int | nHeight |
| Schema * | pSchema |
| typedef PRUint16 Expr::ResultType |
| typedef PRUint16 Expr::ContextSensitivity |
| enum Expr::ExprType |
| anonymous enum |
| anonymous enum |
| Expr::Expr | ( | ) | [inline] |
| virtual Expr::~Expr | ( | ) | [inline, virtual] |
| virtual nsresult Expr::evaluate | ( | txIEvalContext * | aContext, | |
| txAExprResult ** | aResult | |||
| ) | [pure virtual] |
| context | the context node for evaluation of this Expr | |
| ps | the ContextState containing the stack information needed for evaluation |
| virtual ExprType Expr::getType | ( | ) | [inline, virtual] |
| virtual ResultType Expr::getReturnType | ( | ) | [pure virtual] |
| PRBool Expr::canReturnType | ( | ResultType | aType | ) | [inline] |
| virtual PRBool Expr::isSensitiveTo | ( | ContextSensitivity | aContexts | ) | [pure virtual] |
Implemented in FunctionCall.
Does not delete the old expression, that is the responsibility of the caller.
Implemented in FunctionCall.
| nsresult Expr::evaluateToBool | ( | txIEvalContext * | aContext, | |
| PRBool & | aResult | |||
| ) | [virtual] |
| nsresult Expr::evaluateToString | ( | txIEvalContext * | aContext, | |
| nsString & | aResult | |||
| ) | [virtual] |
| virtual void Expr::toString | ( | nsAString & | str | ) | [pure virtual] |
| dest | the String to use when creating the String representation. The String representation will be appended to any data in the destination String, to allow cascading calls to other toString() methods for Expressions. |
1.5.6