Qt 4.8
|
A predicate which is optimized for filter expressions that are of type xs:boolean
.
More...
#include <qtruthpredicate_p.h>
Public Functions | |
virtual ExpressionVisitorResult::Ptr | accept (const ExpressionVisitor::Ptr &visitor) const |
virtual SequenceType::List | expectedOperandTypes () const |
Item::Iterator::Ptr | map (const Item &item, const DynamicContext::Ptr &context) const |
Item | mapToItem (const Item &item, const DynamicContext::Ptr &context) const |
TruthPredicate (const Expression::Ptr &sourceExpression, const Expression::Ptr &predicate) | |
Public Functions inherited from QPatternist::GenericPredicate | |
virtual QString | description () const |
virtual Item::Iterator::Ptr | evaluateSequence (const DynamicContext::Ptr &context) const |
virtual Item | evaluateSingleton (const DynamicContext::Ptr &context) const |
virtual ID | id () const |
Item | mapToItem (const Item &subject, const DynamicContext::Ptr &) const |
virtual Properties | properties () const |
virtual SequenceType::Ptr | staticType () const |
Public Functions inherited from QPatternist::PairContainer | |
virtual bool | compressOperands (const StaticContext::Ptr &) |
virtual Expression::List | operands () const |
virtual void | setOperands (const Expression::List &operands) |
Public Functions inherited from QPatternist::Expression | |
virtual const SourceLocationReflection * | actualReflection () const |
Returns this . More... | |
virtual void | announceFocusType (const ItemType::Ptr &itemType) |
virtual Expression::Ptr | compress (const StaticContext::Ptr &context) |
Properties | deepProperties () const |
Computes the union of properties for this Expression and all its descending children. More... | |
virtual Properties | dependencies () const |
virtual bool | evaluateEBV (const DynamicContext::Ptr &context) const |
virtual void | evaluateToSequenceReceiver (const DynamicContext::Ptr &context) const |
virtual ItemType::Ptr | expectedContextItemType () const |
Expression () | |
bool | has (const Property prop) const |
bool | hasDependency (const Property prop) const |
bool | is (const ID id) const |
bool | isEvaluated () const |
virtual QList< QExplicitlySharedDataPointer< OptimizationPass > > | optimizationPasses () const |
virtual PatternPriority | patternPriority () const |
const Expression::Ptr & | rewrite (const Expression::Ptr &to, const StaticContext::Ptr &context) const |
Rewrites this Expression to to , and return to . More... | |
virtual Expression::Ptr | typeCheck (const StaticContext::Ptr &context, const SequenceType::Ptr &reqType) |
virtual | ~Expression () |
Public Functions inherited from QSharedData | |
QSharedData () | |
Constructs a QSharedData object with a reference count of 0. More... | |
QSharedData (const QSharedData &) | |
Constructs a QSharedData object with reference count 0. More... | |
Public Functions inherited from QPatternist::CppCastingHelper< Expression > | |
const TCastTarget * | as () const |
TCastTarget * | as () |
Public Functions inherited from QPatternist::SourceLocationReflection | |
virtual QSourceLocation | sourceLocation () const |
SourceLocationReflection () | |
virtual | ~SourceLocationReflection () |
A predicate which is optimized for filter expressions that are of type xs:boolean
.
Definition at line 70 of file qtruthpredicate_p.h.
TruthPredicate::TruthPredicate | ( | const Expression::Ptr & | sourceExpression, |
const Expression::Ptr & | predicate | ||
) |
Creates a TruthPredicate 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 52 of file qtruthpredicate.cpp.
|
virtual |
Reimplemented from QPatternist::GenericPredicate.
Definition at line 66 of file qtruthpredicate.cpp.
Referenced by map().
|
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.
Reimplemented from QPatternist::GenericPredicate.
Definition at line 58 of file qtruthpredicate.cpp.
Referenced by map().
|
inline |
Definition at line 93 of file qtruthpredicate_p.h.
|
inline |
Definition at line 83 of file qtruthpredicate_p.h.