Qt 4.8
Public Types | Public Functions | Private Types | Private Functions | Static Private Functions | Properties | Friends | Related Functions | List of all members
QXmlNodeModelIndex Class Reference

The QXmlNodeModelIndex class identifies a node in an XML node model subclassed from QAbstractXmlNodeModel. More...

#include <qabstractxmlnodemodel.h>

Public Types

enum  Axis {
  AxisChild = 1 | ForwardAxis, AxisDescendant = 2 | ForwardAxis, AxisAttribute = 4 | ForwardAxis, AxisSelf = 8 | ForwardAxis,
  AxisDescendantOrSelf = 16 | ForwardAxis, AxisFollowingSibling = 32 | ForwardAxis, AxisNamespace = 64 | ForwardAxis, AxisFollowing = 128 | ReverseAxis,
  AxisParent = 256 | ReverseAxis, AxisAncestor = 512 | ReverseAxis, AxisPrecedingSibling = 1024 | ReverseAxis, AxisPreceding = 2048 | ReverseAxis,
  AxisAncestorOrSelf = 4096 | ReverseAxis, AxisChildOrTop = 32768 | ForwardAxis, AxisAttributeOrTop = 65536 | ForwardAxis
}
 Identify the axes emanating from a node. More...
 
enum  DocumentOrder { Precedes = -1, Is = 0, Follows = 1 }
 Identifies the specific node comparison operator that should be used. More...
 
typedef QAbstractXmlForwardIterator< QXmlNodeModelIndexIterator
 
typedef QList< QXmlNodeModelIndexList
 Typedef for QList<QXmlNodeModelIndex>. More...
 
enum  NodeKind {
  Attribute = 1, Comment = 2, Document = 4, Element = 8,
  Namespace = 16, ProcessingInstruction = 32, Text = 64
}
 Identifies a kind of node. More...
 

Public Functions

qint64 additionalData () const
 Returns the second data value. More...
 
QUrl baseUri () const
 
DocumentOrder compareOrder (const QXmlNodeModelIndex &other) const
 
qint64 data () const
 Returns the first data value. More...
 
QUrl documentUri () const
 
void * internalPointer () const
 Returns the first data value as a void* pointer. More...
 
bool is (const QXmlNodeModelIndex &other) const
 
bool isDeepEqual (const QXmlNodeModelIndex &other) const
 
bool isNull () const
 Returns true if this QXmlNodeModelIndex is a default constructed value, otherwise false. More...
 
QExplicitlySharedDataPointer< QAbstractXmlForwardIterator< QXmlNodeModelIndex > > iterate (const Axis axis) const
 
NodeKind kind () const
 
const QAbstractXmlNodeModelmodel () const
 Returns the QAbstractXmlNodeModel that this node index refers to. More...
 
QXmlName name () const
 
QVector< QXmlNamenamespaceBindings () const
 
QXmlName::NamespaceCode namespaceForPrefix (const QXmlName::PrefixCode prefix) const
 
bool operator!= (const QXmlNodeModelIndex &other) const
 Returns true if other is the same node as this. More...
 
bool operator== (const QXmlNodeModelIndex &other) const
 Returns true if this node is the same as other. More...
 
 QXmlNodeModelIndex ()
 Default constructor. More...
 
 QXmlNodeModelIndex (const QXmlNodeModelIndex &other)
 Standard copy constructor. More...
 
void reset ()
 
QXmlNodeModelIndex root () const
 
void sendNamespaces (QAbstractXmlReceiver *const receiver) const
 
QExplicitlySharedDataPointer< QAbstractXmlForwardIterator< QPatternist::Item > > sequencedTypedValue () const
 
QString stringValue () const
 
QPatternist::ItemTypePtr type () const
 

Private Types

enum  Constants { ForwardAxis = 8192, ReverseAxis = 16384 }
 

Private Functions

 operator int () const
 
 QXmlNodeModelIndex (const QPatternist::NodeIndexStorage &storage)
 

Static Private Functions

static QXmlNodeModelIndex create (const qint64 d, const QAbstractXmlNodeModel *const nm)
 
static QXmlNodeModelIndex create (const qint64 data, const QAbstractXmlNodeModel *const nm, const qint64 addData)
 

Properties

QPatternist::NodeIndexStorage m_storage
 

Friends

class QAbstractXmlNodeModel
 
class QPatternist::Item
 
class QXmlItem
 

Related Functions

(Note that these are not member functions.)

static QString formatData (const QXmlNodeModelIndex node)
 

Detailed Description

The QXmlNodeModelIndex class identifies a node in an XML node model subclassed from QAbstractXmlNodeModel.

Note
This class or function is reentrant.
Since
4.4

QXmlNodeModelIndex is an index into an XML node model. It contains:

Because QXmlNodeModelIndex is intentionally a simple class, it doesn't have member functions for accessing the properties of nodes. For example, it doesn't have functions for getting a node's name or its list of attributes or child nodes. If you find that you need to retrieve this kind of information from your query results, there are two ways to proceed.

The second case is explained by example. Suppose you want to populate a list widget with the values of certain attributes from a set of result elements. You could write an XQuery to return the set of elements, and then you would write the code to iterate over the result elements, get their attributes, and extract the desired string values. But the simpler way is to just augment your XQuery to finding the desired attribute values. Then all you have to do is evaluate the XQuery using the version of QXmlQuery::evaluateTo() that populates a QStringList, which you can send directly to your widget.

QXmlNodeModelIndex doesn't impose any restrictions on the data value an QXmlNodeModelIndex should contain. The meaning of the data left to the associated QAbstractXmlNodeModel {node model}. Because QXmlNodeModelIndex depends on a particular subclass of QAbstractXmlNodeModel for its existence, the only way you can create an instance of QXmlNodeModelIndex is by asking the node model to create one for you with QAbstractXmlNodeModel::createIndex(). Since that function is protected, it is usually a good idea to write a public function that creates a QXmlNodeModelIndex from arguments that are appropriate for your particular node model.

A default constructed node index is said to be null, i.e., isNull() returns true.

QXmlNodeModelIndex and QAbstractXmlNodeModel follow the same design pattern used for QModelIndex and QAbstractItemModel.

Definition at line 118 of file qabstractxmlnodemodel.h.

Typedefs

◆ Iterator

Warning
This function is not part of the public interface.

Typedef for QAbstractXmlForwardIterator<QXmlNodeModelIndex>.

Definition at line 139 of file qabstractxmlnodemodel.h.

◆ List

Typedef for QList<QXmlNodeModelIndex>.

Definition at line 140 of file qabstractxmlnodemodel.h.

Enumerations

◆ Axis

Identify the axes emanating from a node.

Warning
This function is not part of the public interface.

The axes AxisChild, AxisDescendant, AxisAttribute, AxisSelf, AxisDescendantOrSelf, AxisFollowingSibling, and AxisFollowing are forward axes.

The axes AxisParent, AxisAncestor, AxisPrecedingSibling, AxisPreceding and AxisAncestorOrSelf are reverse axes.

See also
{http://www.w3.org/TR/xquery/#axes}{XQuery 1.0: An XML Query Language, 3.2.1.1 Axes}
  • AxisChild The child axis.
  • AxisDescendant The descendant axis.
  • AxisAttribute The attribute axis. Note: There is a node kind named Attribute.
  • AxisSelf The self axis.
  • AxisDescendantOrSelf The descendant-or-self axis.
  • AxisFollowingSibling The following-sibling axis.
  • AxisNamespace The namespace axis. Note: Does not exist in XQuery; deprecated in XPath 2.0 (optionally supported); mandatory in XPath 1.0.
  • AxisFollowing The following axis.
  • AxisParent The parent axis.
  • AxisAncestor The ancestor axis.
  • AxisPrecedingSibling The preceding-sibling axis.
  • AxisPreceding The preceding axis.
  • AxisAncestorOrSelf The ancestor-or-self axis.
Enumerator
AxisChild 
AxisDescendant 
AxisAttribute 
AxisSelf 
AxisDescendantOrSelf 
AxisFollowingSibling 
AxisNamespace 
AxisFollowing 
AxisParent 
AxisAncestor 
AxisPrecedingSibling 
AxisPreceding 
AxisAncestorOrSelf 
AxisChildOrTop 
AxisAttributeOrTop 

Definition at line 160 of file qabstractxmlnodemodel.h.

161  {
162  AxisChild = 1 | ForwardAxis,
165  AxisSelf = 8 | ForwardAxis,
168  AxisNamespace = 64 | ForwardAxis,
169  AxisFollowing = 128 | ReverseAxis,
170  AxisParent = 256 | ReverseAxis,
171  AxisAncestor = 512 | ReverseAxis,
173  AxisPreceding = 2048 | ReverseAxis,
175  /* Note that we cannot clash with the values of ForwardAxis and
176  * ReverseAxis. */
177  AxisChildOrTop = 32768 | ForwardAxis,
179  };

◆ Constants

  • ForwardAxis All forward axes include this flag.
  • ReverseAxis All reverse axes include this flag.
Enumerator
ForwardAxis 
ReverseAxis 

Definition at line 120 of file qabstractxmlnodemodel.h.

◆ DocumentOrder

Identifies the specific node comparison operator that should be used.

  • Precedes Signifies the << operator. Test whether the first operand precedes the second in the document.
  • Follows Signifies the >> operator. Test whether the first operand follows the second in the document.
  • Is Signifies the is operator. Test whether two nodes have the same node identity.
Enumerator
Precedes 
Is 
Follows 

Definition at line 153 of file qabstractxmlnodemodel.h.

◆ NodeKind

Identifies a kind of node.

  • Attribute Identifies an attribute node
  • Text Identifies a text node
  • Comment Identifies a comment node
  • Document Identifies a document node
  • Element Identifies an element node
  • Namespace Identifies a namespace node
  • ProcessingInstruction Identifies a processing instruction.

Note that the optional XML declaration at very beginning of the XML document is not a processing instruction

See also
QAbstractXmlNodeModel::kind()
Enumerator
Attribute 
Comment 
Document 
Element 
Namespace 
ProcessingInstruction 
Text 

Definition at line 142 of file qabstractxmlnodemodel.h.

Constructors and Destructors

◆ QXmlNodeModelIndex() [1/3]

QXmlNodeModelIndex::QXmlNodeModelIndex ( )
inline

Default constructor.

Creates an item that is null.

See also
isNull()

Definition at line 127 of file qabstractxmlnodemodel.h.

128  {
129  reset();
130  }

◆ QXmlNodeModelIndex() [2/3]

QXmlNodeModelIndex::QXmlNodeModelIndex ( const QXmlNodeModelIndex other)
inline

Standard copy constructor.

Creates a QXmlNodeModelIndex instance that is a copy of other.

Definition at line 132 of file qabstractxmlnodemodel.h.

132  : m_storage(other.m_storage)
133  {
134  }
QPatternist::NodeIndexStorage m_storage

◆ QXmlNodeModelIndex() [3/3]

QXmlNodeModelIndex::QXmlNodeModelIndex ( const QPatternist::NodeIndexStorage storage)
inlineprivate

Definition at line 252 of file qabstractxmlnodemodel.h.

252  : m_storage(storage)
253  {
254  }
QPatternist::NodeIndexStorage m_storage

Functions

◆ additionalData()

qint64 QXmlNodeModelIndex::additionalData ( ) const
inline

Returns the second data value.

The node index holds two data values. data() returns the first one.

See also
data()

Definition at line 196 of file qabstractxmlnodemodel.h.

Referenced by QPatternist::GenerateIDFN::evaluateSingleton(), and QHash< QExplicitlySharedDataPointer, QHash >::qHash().

197  {
198  return m_storage.additionalData;
199  }
QPatternist::NodeIndexStorage m_storage

◆ baseUri()

QUrl QXmlNodeModelIndex::baseUri ( ) const
inline
Warning
This function is not part of the public interface.

Definition at line 466 of file qitem_p.h.

Referenced by QPatternist::AccelTree::baseUri().

467  {
468  return m_storage.model->baseUri(*this);
469  }
const QAbstractXmlNodeModel * model
virtual QUrl baseUri(const QXmlNodeModelIndex &ni) const =0
Returns the base URI for the node whose index is n.
QPatternist::NodeIndexStorage m_storage

◆ compareOrder()

QXmlNodeModelIndex::DocumentOrder QXmlNodeModelIndex::compareOrder ( const QXmlNodeModelIndex other) const
inline
Warning
This function is not part of the public interface.

Definition at line 481 of file qitem_p.h.

Referenced by QPatternist::NodeSortExpression::lessThanUsingNodeModel(), QPatternist::UnionIterator::next(), QPatternist::ExceptIterator::next(), and QPatternist::IntersectIterator::next().

482  {
483  Q_ASSERT_X(model() == other.model(), Q_FUNC_INFO, "The API docs guarantees the two nodes are from the same model");
484  return m_storage.model->compareOrder(*this, other);
485  }
const QAbstractXmlNodeModel * model
QPatternist::NodeIndexStorage m_storage
const QAbstractXmlNodeModel * model() const
Returns the QAbstractXmlNodeModel that this node index refers to.
#define Q_ASSERT_X(cond, where, what)
Definition: qglobal.h:1837
virtual QXmlNodeModelIndex::DocumentOrder compareOrder(const QXmlNodeModelIndex &ni1, const QXmlNodeModelIndex &ni2) const =0
This function returns the relative document order for the nodes indexed by ni1 and ni2...
#define Q_FUNC_INFO
Definition: qglobal.h:1871

◆ create() [1/2]

static QXmlNodeModelIndex QXmlNodeModelIndex::create ( const qint64  d,
const QAbstractXmlNodeModel *const  nm 
)
inlinestaticprivate

Definition at line 231 of file qabstractxmlnodemodel.h.

Referenced by QAbstractXmlNodeModel::createIndex().

233  {
235  n.m_storage.data = d;
236  n.m_storage.model = nm;
238  return n;
239  }
double d
Definition: qnumeric_p.h:62
The QXmlNodeModelIndex class identifies a node in an XML node model subclassed from QAbstractXmlNodeM...
const QAbstractXmlNodeModel * model
QPatternist::NodeIndexStorage m_storage

◆ create() [2/2]

static QXmlNodeModelIndex QXmlNodeModelIndex::create ( const qint64  data,
const QAbstractXmlNodeModel *const  nm,
const qint64  addData 
)
inlinestaticprivate

Definition at line 241 of file qabstractxmlnodemodel.h.

244  {
246  n.m_storage.data = data;
247  n.m_storage.model = nm;
248  n.m_storage.additionalData = addData;
249  return n;
250  }
The QXmlNodeModelIndex class identifies a node in an XML node model subclassed from QAbstractXmlNodeM...
const QAbstractXmlNodeModel * model
qint64 data() const
Returns the first data value.
QPatternist::NodeIndexStorage m_storage

◆ data()

qint64 QXmlNodeModelIndex::data ( ) const
inline

Returns the first data value.

The node index holds two data values. additionalData() returns the second one.

See also
additionalData()

Definition at line 181 of file qabstractxmlnodemodel.h.

Referenced by QPatternist::AccelTree::compareOrder(), QHash< QExplicitlySharedDataPointer, QHash >::qHash(), and QPatternist::AccelTree::toPreNumber().

182  {
183  return m_storage.data;
184  }
QPatternist::NodeIndexStorage m_storage

◆ documentUri()

QUrl QXmlNodeModelIndex::documentUri ( ) const
inline
Warning
This function is not part of the public interface.

Definition at line 461 of file qitem_p.h.

462  {
463  return m_storage.model->documentUri(*this);
464  }
virtual QUrl documentUri(const QXmlNodeModelIndex &ni) const =0
Returns the document URI of n.
const QAbstractXmlNodeModel * model
QPatternist::NodeIndexStorage m_storage

◆ internalPointer()

void * QXmlNodeModelIndex::internalPointer ( ) const
inline

Returns the first data value as a void* pointer.

See also
additionalData()

Definition at line 186 of file qabstractxmlnodemodel.h.

Referenced by QPatternist::GenerateIDFN::evaluateSingleton().

187  {
188  return m_storage.pointer();
189  }
QPatternist::NodeIndexStorage m_storage

◆ is()

bool QXmlNodeModelIndex::is ( const QXmlNodeModelIndex other) const
inline
Warning
This function is not part of the public interface.

Definition at line 487 of file qitem_p.h.

Referenced by QPatternist::DeduplicateIterator::next().

488  {
489  return m_storage.model == other.m_storage.model &&
490  m_storage.data == other.m_storage.data &&
492  }
const QAbstractXmlNodeModel * model
QPatternist::NodeIndexStorage m_storage

◆ isDeepEqual()

bool QXmlNodeModelIndex::isDeepEqual ( const QXmlNodeModelIndex other) const
inline
Warning
This function is not part of the public interface.

Definition at line 476 of file qitem_p.h.

477  {
478  return m_storage.model->isDeepEqual(*this, other);
479  }
const QAbstractXmlNodeModel * model
QPatternist::NodeIndexStorage m_storage
virtual bool isDeepEqual(const QXmlNodeModelIndex &ni1, const QXmlNodeModelIndex &ni2) const
Determines whether ni1 is deep equal to ni2.

◆ isNull()

bool QXmlNodeModelIndex::isNull ( ) const
inline

◆ iterate()

QXmlNodeModelIndex::Iterator::Ptr QXmlNodeModelIndex::iterate ( const Axis  axis) const
inline
Warning
This function is not part of the public interface.

Definition at line 456 of file qitem_p.h.

Referenced by QPatternist::PullBridge::attributeItems(), QPatternist::PullBridge::attributes(), QPatternist::AccelTree::baseUri(), QPatternist::AccelTree::copyChildren(), QPatternist::AccelTree::copyNodeTo(), QPatternist::AxisStep::evaluateSequence(), QPatternist::AxisStep::evaluateSingleton(), QPatternist::ParentNodeAxis::evaluateSingleton(), QAbstractXmlNodeModel::isDeepEqual(), QAbstractXmlNodeModel::iterate(), QAbstractXmlNodeModel::mapToSequence(), QPatternist::PullBridge::next(), QAbstractXmlReceiver::sendFromAxis(), and QPatternist::QAbstractXmlReceiver::sendFromAxis().

457  {
458  return m_storage.model->iterate(*this, axis);
459  }
virtual QExplicitlySharedDataPointer< QAbstractXmlForwardIterator< QXmlNodeModelIndex > > iterate(const QXmlNodeModelIndex &ni, QXmlNodeModelIndex::Axis axis) const
Performs navigation, starting from ni, by returning an QAbstractXmlForwardIterator that returns nodes...
const QAbstractXmlNodeModel * model
QPatternist::NodeIndexStorage m_storage

◆ kind()

QXmlNodeModelIndex::NodeKind QXmlNodeModelIndex::kind ( ) const
inline

◆ model()

const QAbstractXmlNodeModel * QXmlNodeModelIndex::model ( ) const
inline

◆ name()

QXmlName QXmlNodeModelIndex::name ( ) const
inline
Warning
This function is not part of the public interface.

Definition at line 446 of file qitem_p.h.

Referenced by QPatternist::PullBridge::attributeItems(), QPatternist::PullBridge::attributes(), QPatternist::AccelTree::copyNodeTo(), QAbstractXmlNodeModel::isDeepEqual(), QPatternist::QNameTest::itemMatches(), QPatternist::NamespaceNameTest::itemMatches(), QPatternist::LocalNameTest::itemMatches(), and QPatternist::PullBridge::name().

447  {
448  return m_storage.model->name(*this);
449  }
const QAbstractXmlNodeModel * model
QPatternist::NodeIndexStorage m_storage
virtual QXmlName name(const QXmlNodeModelIndex &ni) const =0
Returns the name of ni.

◆ namespaceBindings()

QVector< QXmlName > QXmlNodeModelIndex::namespaceBindings ( ) const
inline
Warning
This function is not part of the public interface.

Definition at line 499 of file qitem_p.h.

Referenced by QPatternist::XsdInstanceReader::namespaceBindings().

500  {
501  return m_storage.model->namespaceBindings(*this);
502  }
const QAbstractXmlNodeModel * model
QPatternist::NodeIndexStorage m_storage
virtual QVector< QXmlName > namespaceBindings(const QXmlNodeModelIndex &n) const =0
Returns the in-scope namespaces of n.

◆ namespaceForPrefix()

QXmlName::NamespaceCode QXmlNodeModelIndex::namespaceForPrefix ( const QXmlName::PrefixCode  prefix) const
inline
Warning
This function is not part of the public interface.

Definition at line 504 of file qitem_p.h.

Referenced by QPatternist::XsdInstanceReader::convertToQName(), and QPatternist::NodeNamespaceResolver::lookupNamespaceURI().

505  {
506  return m_storage.model->namespaceForPrefix(*this, prefix);
507  }
virtual QXmlName::NamespaceCode namespaceForPrefix(const QXmlNodeModelIndex &ni, const QXmlName::PrefixCode prefix) const
Returns the namespace URI on ni that corresponds to prefix.
const QAbstractXmlNodeModel * model
QPatternist::NodeIndexStorage m_storage

◆ operator int()

QXmlNodeModelIndex::operator int ( ) const
inlineprivate

◆ operator!=()

bool QXmlNodeModelIndex::operator!= ( const QXmlNodeModelIndex other) const

Returns true if other is the same node as this.

Definition at line 1494 of file qabstractxmlnodemodel.cpp.

1495 {
1496  return !(operator==(other));
1497 }
bool operator==(const QXmlNodeModelIndex &other) const
Returns true if this node is the same as other.

◆ operator==()

bool QXmlNodeModelIndex::operator== ( const QXmlNodeModelIndex other) const

Returns true if this node is the same as other.

This operator does not compare values, children, or names of nodes. It compares node identities, i.e., whether two nodes are from the same document and are found at the exact same place.

Definition at line 1486 of file qabstractxmlnodemodel.cpp.

1487 {
1488  return !(m_storage != other.m_storage);
1489 }
QPatternist::NodeIndexStorage m_storage

◆ reset()

void QXmlNodeModelIndex::reset ( )
inline
Warning
This function is not part of the public interface.

Resets this QXmlNodeModelIndex to be null. It is equivalent to writing:

myInstance = QXmlNodeModelIndex();

Definition at line 225 of file qabstractxmlnodemodel.h.

Referenced by QPatternist::AccelIterator::closedExit().

226  {
227  m_storage.reset();
228  }
QPatternist::NodeIndexStorage m_storage

◆ root()

QXmlNodeModelIndex QXmlNodeModelIndex::root ( ) const
inline
Warning
This function is not part of the public interface.

Definition at line 451 of file qitem_p.h.

Referenced by QPatternist::ContextNodeChecker::checkTargetNode(), and QPatternist::RootFN::evaluateSingleton().

452  {
453  return m_storage.model->root(*this);
454  }
const QAbstractXmlNodeModel * model
QPatternist::NodeIndexStorage m_storage
virtual QXmlNodeModelIndex root(const QXmlNodeModelIndex &n) const =0
Returns the root node of the tree that contains the node whose index is n.

◆ sendNamespaces()

void QXmlNodeModelIndex::sendNamespaces ( QAbstractXmlReceiver *const  receiver) const
inline
Warning
This function is not part of the public interface.

Definition at line 494 of file qitem_p.h.

Referenced by QPatternist::AccelTree::copyNodeTo().

495  {
496  m_storage.model->sendNamespaces(*this, receiver);
497  }
const QAbstractXmlNodeModel * model
QPatternist::NodeIndexStorage m_storage
virtual void sendNamespaces(const QXmlNodeModelIndex &n, QAbstractXmlReceiver *const receiver) const
Sends the namespaces declared on n to receiver.

◆ sequencedTypedValue()

QExplicitlySharedDataPointer< QAbstractXmlForwardIterator< QPatternist::Item > > QXmlNodeModelIndex::sequencedTypedValue ( ) const
inline
Warning
This function is not part of the public interface.

Definition at line 519 of file qitem_p.h.

Referenced by QPatternist::Item::sequencedTypedValue().

520  {
521  return m_storage.model->sequencedTypedValue(*this);
522  }
virtual QPatternist::ItemIteratorPtr sequencedTypedValue(const QXmlNodeModelIndex &ni) const
const QAbstractXmlNodeModel * model
QPatternist::NodeIndexStorage m_storage

◆ stringValue()

QString QXmlNodeModelIndex::stringValue ( ) const
inline
Warning
This function is not part of the public interface.

Definition at line 509 of file qitem_p.h.

Referenced by QPatternist::PullBridge::attributes(), formatData(), and QAbstractXmlNodeModel::isDeepEqual().

510  {
511  return m_storage.model->stringValue(*this);
512  }
const QAbstractXmlNodeModel * model
QPatternist::NodeIndexStorage m_storage
virtual QString stringValue(const QXmlNodeModelIndex &n) const =0
Returns the string value for node n.

◆ type()

QPatternist::ItemType::Ptr QXmlNodeModelIndex::type ( ) const
inline
Warning
This function is not part of the public interface.

Definition at line 514 of file qitem_p.h.

515  {
516  return m_storage.model->type(*this);
517  }
const QAbstractXmlNodeModel * model
QPatternist::NodeIndexStorage m_storage
virtual QPatternist::ItemTypePtr type(const QXmlNodeModelIndex &ni) const

Friends and Related Functions

◆ formatData()

static QString formatData ( const QXmlNodeModelIndex  node)
related

This is an overload, provided for convenience.

Definition at line 440 of file qitem_p.h.

Referenced by QPatternist::AbstractFloatMathematician< isDouble >::calculate(), and QPatternist::CastingPlatform< UntypedAtomicConverter, true >::issueCastError().

441  {
442  return node.stringValue(); // This can be improved a lot.
443  }
QString stringValue() const
Definition: qitem_p.h:509

◆ QAbstractXmlNodeModel

Definition at line 256 of file qabstractxmlnodemodel.h.

◆ QPatternist::Item

friend class QPatternist::Item
friend

Definition at line 257 of file qabstractxmlnodemodel.h.

◆ QXmlItem

friend class QXmlItem
friend

Definition at line 258 of file qabstractxmlnodemodel.h.

Properties

◆ m_storage

QPatternist::NodeIndexStorage QXmlNodeModelIndex::m_storage
private

Definition at line 261 of file qabstractxmlnodemodel.h.

Referenced by create(), is(), and operator==().


The documentation for this class was generated from the following files: