Qt 4.8
|
A predicate that can handle all kinds of predicates and is therefore not very efficient, but can cope with all the tricky scenarios. More...
#include <qgenericpredicate_p.h>
Static Public Functions | |
static Expression::Ptr | create (const Expression::Ptr &sourceExpression, const Expression::Ptr &predicateExpression, const StaticContext::Ptr &context, const QSourceLocation &location) |
static Expression::Ptr | createFirstItem (const Expression::Ptr &sourceExpression) |
Static Public Functions inherited from QPatternist::Expression | |
static void | rewrite (Expression::Ptr &old, const Expression::Ptr &New, const StaticContext::Ptr &context) |
Protected Functions | |
GenericPredicate (const Expression::Ptr &sourceExpression, const Expression::Ptr &predicate) | |
virtual ItemType::Ptr | newFocusType () const |
Protected Functions inherited from QPatternist::PairContainer | |
PairContainer (const Expression::Ptr &operand1, const Expression::Ptr &operand2) | |
Protected Functions inherited from QPatternist::Expression | |
void | typeCheckOperands (const StaticContext::Ptr &context) |
Protected Functions inherited from QPatternist::CppCastingHelper< Expression > | |
CppCastingHelper () | |
Private Types | |
typedef QExplicitlySharedDataPointer< const GenericPredicate > | ConstPtr |
A predicate that can handle all kinds of predicates and is therefore not very efficient, but can cope with all the tricky scenarios.
Definition at line 72 of file qgenericpredicate_p.h.
|
private |
Definition at line 140 of file qgenericpredicate_p.h.
|
protected |
Creates a GenericPredicate which filters the items from the sourceExpression
through predicate
.
This constructor is protected. The proper way to create predicates is via the static create() function.
Definition at line 60 of file qgenericpredicate.cpp.
Referenced by create().
|
virtual |
Implements QPatternist::Expression.
Reimplemented in QPatternist::TruthPredicate.
Definition at line 193 of file qgenericpredicate.cpp.
|
static |
Creates a predicate expression that filters the items gained from evaluating sourceExpression
through the filter predicateExpression
.
This function performs type analyzis on the passed expressions, and may return more specialized expressions depending on the analyzis.
If predicateExpression
is an invalid predicate, an error is issued via the context
.
Definition at line 66 of file qgenericpredicate.cpp.
Referenced by QPatternist::createIdPatternPath(), QPatternist::createPatternPath(), and QPatternist::yyparse().
|
static |
Definition at line 117 of file qgenericpredicate.cpp.
Referenced by create(), QPatternist::CardinalityVerifier::verifyCardinality(), and QPatternist::yyparse().
|
virtual |
Reimplementation of SourceLocationReflection::description().
Reimplemented from QPatternist::Expression.
Definition at line 208 of file qgenericpredicate.cpp.
|
virtual |
Creates a source iterator which is passed to the ItemMappingIterator and the Focus. The ItemMappingIterator modifies it with its QAbstractXmlForwardIterator::next() calls, and since the Focus references the same QAbstractXmlForwardIterator, the focus is automatically moved.
Reimplemented from QPatternist::Expression.
Definition at line 159 of file qgenericpredicate.cpp.
|
virtual |
Doesn't return the first item from calling evaluateSequence(), but does the mapping manually. This avoid allocating an ItemMappingIterator.
Reimplemented from QPatternist::Expression.
Definition at line 170 of file qgenericpredicate.cpp.
|
virtual |
Returns a list of Sequence Types, describing the type of each of the expression's operands. Hence, this function has a relationship to the operands() function:
- The lengths of the lists returned by expectedOperandTypes() and operands() should always be equal in length, since one cannot describe the type of a non-existent operand(and all operands must have type information). - A significant difference between the two functions is that while the type of objects in the list returned by operands() may vary between compilations/static context, simply because the particular Expression is part of different XPath expressions, the types in the list returned by expectedOperandTypes is always the same since the function/operator signature never changes.
This function should not be confused with staticType(), which returns the static type of the expression itself, not its operands. The function call is an expression where this is clear: the type of the return value is not the same as the arguments' types. The static type of the operands supplied to the expression can be determined via the staticType() function of the instances returned by operands().
If the expression has no operands, an empty list should be returned.
Implements QPatternist::Expression.
Reimplemented in QPatternist::TruthPredicate.
Definition at line 178 of file qgenericpredicate.cpp.
|
virtual |
This property, which has no setter, returns an enum value that uniquely identifies this Expression. Patternist makes no use of C++'s dynamic_cast feature, but uses this polymorphic function instead.
Reimplemented from QPatternist::Expression.
Definition at line 213 of file qgenericpredicate.cpp.
|
inline |
Definition at line 123 of file qgenericpredicate.cpp.
Referenced by evaluateSingleton().
|
protectedvirtual |
Reimplemented from QPatternist::Expression.
Definition at line 198 of file qgenericpredicate.cpp.
|
virtual |
Reimplemented from QPatternist::Expression.
Definition at line 203 of file qgenericpredicate.cpp.
|
virtual |
Implements QPatternist::Expression.
Definition at line 186 of file qgenericpredicate.cpp.