Constructs an element node. This covers both computed and directly constructed element nodes.
More...
#include <qattributeconstructor_p.h>
|
typedef QExplicitlySharedDataPointer< const Expression > | ConstPtr |
| A smart pointer wrapping const Expression instances. More...
|
|
enum | ID {
IDBooleanValue = 1,
IDCountFN,
IDEmptyFN,
IDExistsFN,
IDExpressionSequence,
IDGeneralComparison,
IDIfThenClause,
IDIgnorableExpression,
IDIntegerValue,
IDPositionFN,
IDStringValue,
IDValueComparison,
IDRangeVariableReference,
IDContextItem,
IDUserFunctionCallsite,
IDExpressionVariableReference,
IDAttributeConstructor,
IDUpperCaseFN,
IDLowerCaseFN,
IDFirstItemPredicate,
IDEmptySequence,
IDReturnOrderBy,
IDLetClause,
IDForClause,
IDPath,
IDNamespaceConstructor,
IDArgumentReference,
IDGenericPredicate,
IDAxisStep,
IDFloat,
IDCombineNodes,
IDUnresolvedVariableReference,
IDCardinalityVerifier
} |
|
typedef QList< Expression::Ptr > | List |
|
typedef QFlags< Property > | Properties |
|
enum | Property {
UseContextItem = 1,
DisableElimination = 1 << 1,
IsEvaluated = 1 << 2,
DisableTypingDeduction = 1 << 3,
EmptynessFollowsChild = 1 << 4,
RewriteToEmptyOnEmpty = 1 << 5,
RequiresFocus = 1 << 6,
AffectsOrderOnly = 1 << 7,
RequiresContextItem = (1 << 8) | RequiresFocus,
CreatesFocusForLast = 1 << 9,
LastOperandIsCollation = 1 << 10,
DependsOnLocalVariable = (1 << 11) | DisableElimination,
EvaluationCacheRedundant = (1 << 12),
IsNodeConstructor = 1 << 13,
RequiresCurrentItem = 1 << 14
} |
|
typedef QExplicitlySharedDataPointer< Expression > | Ptr |
| A smart pointer wrapping mutable Expression instances. More...
|
|
typedef ::QAbstractXmlForwardIterator< Expression::Ptr > | QAbstractXmlForwardIterator |
|
typedef QVector< Expression::Ptr > | Vector |
|
static void | rewrite (Expression::Ptr &old, const Expression::Ptr &New, const StaticContext::Ptr &context) |
|
QAtomicInt | ref |
|
| PairContainer (const Expression::Ptr &operand1, const Expression::Ptr &operand2) |
|
void | typeCheckOperands (const StaticContext::Ptr &context) |
|
| CppCastingHelper () |
|
Expression::Ptr | m_operand1 |
|
Expression::Ptr | m_operand2 |
|
Constructs an element node. This covers both computed and directly constructed element nodes.
- See also
- XQuery 1.0: An XML Query Language, 3.7 Constructors
- Author
- Frans Englich frans.nosp@m..eng.nosp@m.lich@.nosp@m.noki.nosp@m.a.com
Definition at line 72 of file qattributeconstructor_p.h.
◆ AttributeConstructor()
Definition at line 54 of file qattributeconstructor.cpp.
PairContainer(const Expression::Ptr &operand1, const Expression::Ptr &operand2)
◆ accept()
◆ evaluateSingleton()
Reimplemented from QPatternist::Expression.
Definition at line 70 of file qattributeconstructor.cpp.
The QXmlNodeModelIndex class identifies a node in an XML node model subclassed from QAbstractXmlNodeM...
virtual void addNodeModel(const QAbstractXmlNodeModel::Ptr &nm)=0
The QExplicitlySharedDataPointer class represents a pointer to an explicitly shared object...
The QUrl class provides a convenient interface for working with URLs.
The QString class provides a Unicode character string.
static QString processValue(const QXmlName name, const Item &value)
The QStringRef class provides a thin wrapper around QString substrings.
The QXmlName class represents the name of an XML node, in an efficient, namespace-aware way...
Represents an item in the XPath 2.0 Data Model.
Implements the value instance of the xs:QName type.
Expression::Ptr m_operand1
virtual NodeBuilder::Ptr nodeBuilder(const QUrl &baseURI) const =0
Expression::Ptr m_operand2
virtual void attribute(const QXmlName name, const QString &value)=0
Signals the presence of an attribute node.
virtual Item evaluateSingleton(const DynamicContext::Ptr &context) const
◆ evaluateToSequenceReceiver()
void AttributeConstructor::evaluateToSequenceReceiver |
( |
const DynamicContext::Ptr & |
context | ) |
const |
|
virtual |
Evaluates this Expression by sending its output to DynamicContext::outputReceiver().
Reimplemented from QPatternist::Expression.
Definition at line 86 of file qattributeconstructor.cpp.
A push interface for the XPath Data Model. Similar to SAX's ContentHandler.
The QString class provides a Unicode character string.
static QString processValue(const QXmlName name, const Item &value)
The QStringRef class provides a thin wrapper around QString substrings.
The QXmlName class represents the name of an XML node, in an efficient, namespace-aware way...
Represents an item in the XPath 2.0 Data Model.
Implements the value instance of the xs:QName type.
Expression::Ptr m_operand1
virtual QAbstractXmlReceiver * outputReceiver() const =0
Expression::Ptr m_operand2
virtual void attribute(const QXmlName name, const QString &value)=0
Signals the presence of an attribute node.
virtual Item evaluateSingleton(const DynamicContext::Ptr &context) const
◆ expectedOperandTypes()
The first operand must be exactly one xs:QName
, and the second argument can be zero or more items.
Implements QPatternist::Expression.
Definition at line 103 of file qattributeconstructor.cpp.
static const SequenceType::Ptr ZeroOrMoreItems
static const SequenceType::Ptr ExactlyOneQName
void append(const T &t)
Inserts value at the end of the list.
The QList class is a template class that provides lists.
◆ id()
◆ processValue()
Definition at line 59 of file qattributeconstructor.cpp.
Referenced by evaluateSingleton(), and evaluateToSequenceReceiver().
The QString class provides a Unicode character string.
QString stringValue() const
Returns the string value of this Item.
The QXmlName class represents the name of an XML node, in an efficient, namespace-aware way...
QString simplified() const Q_REQUIRED_RESULT
Returns a string that has whitespace removed from the start and the end, and that has each sequence o...
◆ properties()
- Returns
- a bitwise OR'd value of properties, describing the characteristics of the expression. These properties affects how this Expression is treated in for example type checking stages.
The default implementation returns 0. Override and let the function return a different value, if that's of interest.
An important decision when re-implementing properties() is whether to OR in the properties() of ones operands. For instance, if an operand has RequiresFocus set, that flag nost likely applies to the apparent as well, since it depends on its operand.
- See also
- deepProperties()
- Returns
- Expression::None, meaning no special properties
Reimplemented from QPatternist::Expression.
Definition at line 111 of file qattributeconstructor.cpp.
◆ staticType()
The documentation for this class was generated from the following files: