520 for(
int i = 0; i < m_list.count(); ++i)
521 result.
append(m_list.at(i)->copy());
537 iterators.
append(makeSingletonIterator(node));
540 return makeSequenceMappingIterator<QXmlNodeModelIndex>(&
mergeIterator,
551 return mergeIterators(ni, makeSequenceMappingIterator<QXmlNodeModelIndex>(
this,
627 return makeSingletonIterator(ni);
631 return makeEmptyIterator<QXmlNodeModelIndex>();
636 return makeEmptyIterator<QXmlNodeModelIndex>();
644 ancestors.
append(ancestor);
658 ancestors.
append(ancestor);
671 preceding.
append(sibling);
684 preceding.
append(sibling);
703 return makeSingletonIterator(ni);
730 return makeSequenceMappingIterator<QXmlNodeModelIndex>(
this,
737 return makeSingletonIterator(ni);
771 return makeSequenceMappingIterator<QXmlNodeModelIndex>(&
mergeIterator,
778 return makeEmptyIterator<QXmlNodeModelIndex>();
930 const int len = nss.
size();
931 for(
int i = 0; i < len; ++i)
1002 return makeSingletonIterator(AtomicValue::toXDM(candidate));
1011 "This function is internal and must not be called.");
1040 const int len = nbs.
size();
1042 for(
int i = 0; i < len; ++i)
1048 return NamespaceResolver::NoBinding;
1095 while(!node.isNull())
1107 node = atts1->next();
1128 if(!no1.isNull() && !no2.isNull())
1134 return no1.
isNull() && no2.isNull();
1281 || model != other.
model;
1732 "This function is not expected to be called.");
1746 return d_ptr->sourceLocation(index);
The QVariant class acts like a union for the most common Qt data types.
virtual QXmlName::NamespaceCode namespaceForPrefix(const QXmlNodeModelIndex &ni, const QXmlName::PrefixCode prefix) const
Returns the namespace URI on ni that corresponds to prefix.
The QXmlNodeModelIndex class identifies a node in an XML node model subclassed from QAbstractXmlNodeM...
QIntegerForSizeof< void * >::Unsigned quintptr
A push interface for the XPath Data Model. Similar to SAX's ContentHandler.
#define QT_END_NAMESPACE
This macro expands to.
bool internalIsAtomicValue() const
bool isNull() const
Returns true if this QXmlNodeModelIndex is a default constructed value, otherwise false...
virtual void namespaceBinding(const QXmlName &nb)=0
Signals the presence of the namespace declaration nb.
static QVariant toQt(const AtomicValue *const value)
bool isNull() const
Returns true if this is a NULL variant, false otherwise.
#define it(className, varName)
Due to strong interdependencies, this file contains the definitions for the classes Item...
The QXmlItem class contains either an XML node or an atomic value.
virtual QXmlNodeModelIndex::NodeKind kind(const QXmlNodeModelIndex &ni) const =0
Returns a value indicating the kind of node identified by ni.
The QExplicitlySharedDataPointer class represents a pointer to an explicitly shared object...
The QList::const_iterator class provides an STL-style const iterator for QList and QQueue...
#define Q_DISABLE_COPY(Class)
Disables the use of copy constructors and assignment operators for the given Class.
QAbstractXmlForwardIterator< T >::Ptr makeListIterator(const QList< T > &list)
const QPatternist::AtomicValue * m_atomicValue
virtual QPatternist::ItemIteratorPtr sequencedTypedValue(const QXmlNodeModelIndex &ni) const
uint qHash(const QXmlNodeModelIndex &index)
Computes a hash key from the QXmlNodeModelIndex index, and returns it.
bool ref()
Atomically increments the value of this QAtomicInt.
const AtomicValue * asAtomicValue() const
bool isNode() const
Determines whether this item is an atomic value, or a node.
QPatternist::NodeIndexStorage m_node
virtual QExplicitlySharedDataPointer< QAbstractXmlForwardIterator< QXmlNodeModelIndex > > iterate(const QXmlNodeModelIndex &ni, QXmlNodeModelIndex::Axis axis) const
Performs navigation, starting from ni, by returning an QAbstractXmlForwardIterator that returns nodes...
The QVector class is a template class that provides a dynamic array.
static const EmptyIterator< Item >::Ptr emptyIterator
QString prefix(const QXmlNamePool &query) const
Returns the prefix.
const QAbstractXmlNodeModel * model
virtual QXmlNodeModelIndex nextFromSimpleAxis(SimpleAxis axis, const QXmlNodeModelIndex &origin) const =0
When QtXmlPatterns evaluate path expressions, it emulate them through a combination of calls with QSi...
QAbstractXmlForwardIterator< T >::Ptr makeVectorIterator(const QVector< T > &vector)
void append(const T &t)
Inserts value at the end of the list.
QScopedPointer< QAbstractXmlNodeModelPrivate > d_ptr
#define QT_BEGIN_NAMESPACE
This macro expands to.
qint64 data() const
Returns the first data value.
bool isNode() const
Returns true if this item is a Node.
The QAbstractXmlNodeModel class is an abstract base class for modeling non-XML data to look like XML ...
QAbstractXmlForwardIterator< QXmlNodeModelIndexIteratorPointer >::Ptr Ptr
bool operator==(const QXmlNodeModelIndex &other) const
Returns true if this node is the same as other.
bool deref()
Atomically decrements the value of this QAtomicInt.
QPatternist::NodeIndexStorage m_storage
The namespace for the internal API of QtXmlPatterns.
void append(const T &t)
Inserts value at the end of the vector.
QXmlItem()
Constructs a null QXmlItem that is neither a node nor an atomic value.
The QSourceLocation class identifies a location in a resource by URI, line, and column.
static const char * data(const QByteArray &arr)
QVariant toAtomicValue() const
If this QXmlItem represents an atomic value, it is converted to an appropriate QVariant and returned...
virtual QAbstractXmlForwardIterator< QXmlNodeModelIndexIteratorPointer >::Ptr copy() const
Copies this QAbstractXmlForwardIterator and returns the copy.
const QAbstractXmlNodeModel * model() const
Returns the QAbstractXmlNodeModel that this node index refers to.
virtual QPatternist::ItemTypePtr type(const QXmlNodeModelIndex &ni) const
const T & at(int i) const
Returns the item at index position i in the vector.
QExplicitlySharedDataPointer< ItemType > ItemTypePtr
virtual QVariant typedValue(const QXmlNodeModelIndex &n) const =0
Returns the typed value for node node.
NamespaceCode namespaceURI() const
#define Q_ASSERT_X(cond, where, what)
IteratorVector(const ItVector &in)
Represents an item in the XPath 2.0 Data Model.
static const MergeIterator mergeIterator
NodeKind
Identifies a kind of node.
bool operator!=(const QXmlNodeModelIndex &other) const
Returns true if other is the same node as this.
bool isAtomicValue() const
Returns true if this item is an atomic value.
QExplicitlySharedDataPointer< QAbstractXmlForwardIterator< QXmlNodeModelIndex > > iterate(const Axis axis) const
virtual ~QAbstractXmlNodeModel()
Destructor.
static Item fromPublic(const QXmlItem &i)
QSourceLocation sourceLocation(const QXmlNodeModelIndex &index) const
Returns the source location for the object with the given index or a default constructed QSourceLocat...
virtual void sendNamespaces(const QXmlNodeModelIndex &n, QAbstractXmlReceiver *const receiver) const
Sends the namespaces declared on n to receiver.
QExplicitlySharedDataPointer< QAbstractXmlForwardIterator< QXmlNodeModelIndex > > mapToSequence(const QXmlNodeModelIndex &ni, const QExplicitlySharedDataPointer< QPatternist::DynamicContext > &) const
Axis
Identify the axes emanating from a node.
virtual bool isDeepEqual(const QXmlNodeModelIndex &ni1, const QXmlNodeModelIndex &ni2) const
Determines whether ni1 is deep equal to ni2.
QExplicitlySharedDataPointer< QAbstractXmlForwardIterator< QXmlNodeModelIndex > > QXmlNodeModelIndexIteratorPointer
QVector< QXmlNodeModelIndexIteratorPointer > ItVector
static bool isIgnorableInDeepEqual(const QXmlNodeModelIndex &n)
bool isEmpty() const
Returns true if the vector has size 0; otherwise returns false.
QXmlItem & operator=(const QXmlItem &other)
Assigns other to this.
The QFlags class provides a type-safe way of storing OR-combinations of enum values.
QXmlNodeModelIndex toNodeModelIndex() const
If this QXmlItem represents a node, it returns the item as a QXmlNodeModelIndex.
bool operator!=(const NodeIndexStorage &other) const
QAbstractXmlNodeModel()
Default constructor.
qint64 additionalData() const
Returns the second data value.
static const KeyPair *const end
virtual void copyNodeTo(const QXmlNodeModelIndex &node, QAbstractXmlReceiver *const receiver, const NodeCopySettings &) const
static Item toXDM(const QVariant &value)
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
bool operator==(QBool b1, bool b2)
int size() const
Returns the number of items in the vector.
QString stringValue() const
Bridges values in Qt's QList container class into an QAbstractXmlForwardIterator. ...
virtual QVector< QXmlName > namespaceBindings(const QXmlNodeModelIndex &n) const =0
Returns the in-scope namespaces of n.
QExplicitlySharedDataPointer< QAbstractXmlNodeModel > Ptr
A QExplicitlySharedDataPointer {smart pointer} to an instance of QAbstractXmlNodeModel.
static bool isNull(const QVariant::Private *d)
virtual QVector< QXmlNodeModelIndex > attributes(const QXmlNodeModelIndex &element) const =0
Returns the attributes of element.
static bool equal(const QChar *a, int l, const char *b)
QXmlNodeModelIndexIteratorPointer mapToSequence(const QXmlNodeModelIndexIteratorPointer &it, const DynamicContext::Ptr &) const
bool isNull() const
Returns true if this QXmlItem is neither a node nor an atomic value.
The QList class is a template class that provides lists.
static QXmlNodeModelIndexIteratorPointer mergeIterators(const QXmlNodeModelIndex &node, const QXmlNodeModelIndexIteratorPointer &it2)