Expr Struct Reference

#include <txExpr.h>

Inheritance diagram for Expr:

Inheritance graph
[legend]
Collaboration diagram for Expr:

Collaboration graph
[legend]

List of all members.

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 ExprgetSubExprAt (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
CollSeqpColl
ExprpLeft
ExprpRight
ExprListpList
Token token
Token span
int iTable
int iColumn
AggInfopAggInfo
int iAgg
int iRightJoinTable
SelectpSelect
TablepTab
int nHeight
SchemapSchema


Member Typedef Documentation


Member Enumeration Documentation

Enumerator:
LOCATIONSTEP_EXPR 
PATH_EXPR 
UNION_EXPR 
LITERAL_EXPR 
OTHER_EXPR 

anonymous enum

Enumerator:
NODESET_RESULT 
BOOLEAN_RESULT 
NUMBER_RESULT 
STRING_RESULT 
RTF_RESULT 
ANY_RESULT 

anonymous enum

Enumerator:
NO_CONTEXT 
NODE_CONTEXT 
POSITION_CONTEXT 
SIZE_CONTEXT 
NODESET_CONTEXT 
VARIABLES_CONTEXT 
PRIVATE_CONTEXT 
ANY_CONTEXT 


Constructor & Destructor Documentation

Expr::Expr (  )  [inline]

virtual Expr::~Expr (  )  [inline, virtual]


Member Function Documentation

virtual nsresult Expr::evaluate ( txIEvalContext aContext,
txAExprResult **  aResult 
) [pure virtual]

Parameters:
context the context node for evaluation of this Expr
ps the ContextState containing the stack information needed for evaluation
Returns:
the result of the 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]

virtual Expr* Expr::getSubExprAt ( PRUint32  aPos  )  [pure virtual]

Implemented in FunctionCall.

virtual void Expr::setSubExprAt ( PRUint32  aPos,
Expr aExpr 
) [pure virtual]

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]

Parameters:
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.
Returns:
the String representation of this Expr.


Member Data Documentation


The documentation for this struct was generated from the following files:

Generated Mozilla by doxygen 1.5.6