52 #ifndef Patternist_AccelTree_H 53 #define Patternist_AccelTree_H 130 const PreNumber aParent,
182 "Currently, only text nodes are compressed.");
185 return m_size == IsCompressed;
281 return m_documentURI;
296 return basicData.
at(pre).size() > 0;
307 inline PreNumber
parent(
const PreNumber pre)
const 309 return basicData.
at(pre).parent();
314 return basicData.
at(pre).depth() > 0;
319 return pre < maximumPreNumber();
330 return basicData.
at(pre).kind();
335 return basicData.
count() - 1;
343 inline PreNumber
size(
const PreNumber pre)
const 346 "The size cannot be -1. That means an uninitialized value is attempted to be used.");
347 return basicData.
at(pre).size();
350 inline Depth
depth(
const PreNumber pre)
const 352 return basicData.
at(pre).depth();
359 return basicData.
at(pre).name();
364 return basicData.
at(pre).isCompressed();
The QVariant class acts like a union for the most common Qt data types.
The QXmlNodeModelIndex class identifies a node in an XML node model subclassed from QAbstractXmlNodeM...
A push interface for the XPath Data Model. Similar to SAX's ContentHandler.
#define QT_END_NAMESPACE
This macro expands to.
int count(const T &t) const
Returns the number of occurrences of value in the vector.
Due to strong interdependencies, this file contains the definitions for the classes Item...
Builds an AccelTree from a stream of XML/Item events received through the NodeBuilder interface...
QXmlNodeModelIndex::NodeKind kind(const PreNumber pre) const
BasicNodeData(const PreNumber aDepth, const PreNumber aParent, const QXmlNodeModelIndex::NodeKind k, const PreNumber s, const QXmlName n=QXmlName())
The QUrl class provides a convenient interface for working with URLs.
The QString class provides a Unicode character string.
The QHash class is a template class that provides a hash-table-based dictionary.
QHash< PreNumber, QVector< QXmlName > > namespaces
bool isCompressed(const PreNumber pre) const
PreNumber toPreNumber(const QXmlNodeModelIndex n) const
PreNumber parent(const PreNumber pre) const
Returns the parent node of pre.
bool hasParent(const PreNumber pre) const
#define QT_BEGIN_NAMESPACE
This macro expands to.
qint64 data() const
Returns the first data value.
QXmlNodeModelIndex::NodeKind m_kind
QVector< BasicNodeData > basicData
The QAbstractXmlNodeModel class is an abstract base class for modeling non-XML data to look like XML ...
DocumentOrder
Identifies the specific node comparison operator that should be used.
Q_DECLARE_TYPEINFO(QPatternist::AccelTree::BasicNodeData, Q_MOVABLE_TYPE)
The namespace for the internal API of QtXmlPatterns.
bool hasChildren(const PreNumber pre) const
Returns true if the node identified by pre has child nodes(in the sense of the XDM), but also if it has namespace nodes, or attribute nodes.
The QSourceLocation class identifies a location in a resource by URI, line, and column.
Depth depth(const PreNumber pre) const
QHash< PreNumber, QString > data
QXmlName name(const PreNumber pre) const
const T & at(int i) const
Returns the item at index position i in the vector.
#define Q_ASSERT_X(cond, where, what)
The QXmlName class represents the name of an XML node, in an efficient, namespace-aware way...
Stores an XML document using the XPath Accelerator scheme, also known as pre/post numbering...
NodeKind
Identifies a kind of node.
QXmlNodeModelIndex createIndex(qint64 data) const
Creates a node index with data as its internal data.
SimpleAxis
Four axes that each contain one node only.
bool isCompressed() const
PostNumber postNumber(const PreNumber pre) const
#define Q_AUTOTEST_EXPORT
Axis
Identify the axes emanating from a node.
Houses data for a node, and that all node kinds have.
The QFlags class provides a type-safe way of storing OR-combinations of enum values.
PreNumber maximumPreNumber() const
PreNumber size(const PreNumber pre) const
QExplicitlySharedDataPointer< AccelTree > Ptr
QHash< QXmlName::LocalNameCode, PreNumber > m_IDs
bool hasFollowingSibling(const PreNumber pre) const
void setSize(const PreNumber aSize)
QHash< PreNumber, QPair< qint64, qint64 > > sourcePositions
QXmlNodeModelIndex::NodeKind kind() const