52 #ifndef Patternist_Expression_H 53 #define Patternist_Expression_H 56 #include <QSharedData> 71 template<
typename T>
class QList;
72 template<
typename T>
class QVector;
76 template<
typename T,
typename ListType>
class ListIterator;
77 class OptimizationPass;
224 DisableElimination = 1 << 1,
234 IsEvaluated = 1 << 2,
245 DisableTypingDeduction = 1 << 3,
260 EmptynessFollowsChild = 1 << 4,
269 RewriteToEmptyOnEmpty = 1 << 5,
281 RequiresFocus = 1 << 6,
287 AffectsOrderOnly = 1 << 7,
297 RequiresContextItem = (1 << 8) | RequiresFocus,
307 CreatesFocusForLast = 1 << 9,
316 LastOperandIsCollation = 1 << 10,
323 DependsOnLocalVariable = (1 << 11) | DisableElimination,
329 EvaluationCacheRedundant = (1 << 12),
340 IsNodeConstructor = 1 << 13,
348 RequiresCurrentItem = 1 << 14
486 IDCardinalityVerifier
670 virtual Properties dependencies()
const;
678 Properties deepProperties()
const;
688 inline bool isEvaluated()
const;
698 inline bool is(
const ID id)
const;
711 inline bool has(
const Property prop)
const;
713 inline bool hasDependency(
const Property prop)
const;
724 virtual ID id()
const;
766 virtual QString description()
const;
789 virtual void announceFocusType(
const ItemType::Ptr &itemType);
863 return has(IsEvaluated);
873 return dependencies().testFlag(prop);
886 <<
'(' << old->actualReflection() <<
"to" << New->actualReflection() <<
", " 887 << old->description() <<
"to" << New->description() <<
')';
890 context->addLocation(New.
data(), context->locationFor(old->actualReflection()));
898 context->addLocation(to.
data(), context->locationFor(
this));
Q_DECLARE_TYPEINFO(QPatternist::Expression::Ptr, Q_MOVABLE_TYPE)
#define QT_END_NAMESPACE
This macro expands to.
Base class for all AST nodes in an XPath/XQuery/XSL-T expression.
Provides convenience methods for performing static casts between C++ classes.
Due to strong interdependencies, this file contains the definitions for the classes Item...
QExplicitlySharedDataPointer< const Expression > ConstPtr
A smart pointer wrapping const Expression instances.
QList< Expression::Ptr > List
QVector< Expression::Ptr > Vector
#define Q_DISABLE_COPY(Class)
Disables the use of copy constructors and assignment operators for the given Class.
Contains macros for debugging.
The QString class provides a Unicode character string.
The QVector class is a template class that provides a dynamic array.
bool hasDependency(const Property prop) const
bool has(const Property prop) const
T * data() const
Returns a pointer to the shared data object.
#define QT_BEGIN_NAMESPACE
This macro expands to.
#define Q_DECLARE_OPERATORS_FOR_FLAGS(Flags)
The Q_DECLARE_OPERATORS_FOR_FLAGS() macro declares global operator|() functions for Flags...
static void rewrite(Expression::Ptr &old, const Expression::Ptr &New, const StaticContext::Ptr &context)
The QAbstractXmlForwardIterator class is a base class for forward iterators.
#define QT_PREPEND_NAMESPACE(name)
This macro qualifies identifier with the full namespace.
The namespace for the internal API of QtXmlPatterns.
QExplicitlySharedDataPointer< Expression > Ptr
A smart pointer wrapping mutable Expression instances.
QFlags< Property > Properties
Represents an item in the XPath 2.0 Data Model.
The QSharedData class is a base class for shared data objects.
#define Q_AUTOTEST_EXPORT
static const QCssKnownValue properties[NumProperties - 1]
The QFlags class provides a type-safe way of storing OR-combinations of enum values.
The QList class is a template class that provides lists.
Base class for all instances that represents something at a certain location.