Qyoto  4.0.5
Qyoto is a C# language binding for Qt
 All Classes Namespaces Functions Variables Typedefs Enumerations Properties
QtXmlPatterns.QXmlNodeModelIndex Class Reference

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

Inheritance diagram for QtXmlPatterns.QXmlNodeModelIndex:
Collaboration diagram for QtXmlPatterns.QXmlNodeModelIndex:

Public Types

enum  Axis {
  AxisAncestor = 16896, AxisAncestorOrSelf = 20480, AxisAttribute = 8196, AxisAttributeOrTop = 73728,
  AxisChild = 8193, AxisChildOrTop = 40960, AxisDescendant = 8194, AxisDescendantOrSelf = 8208,
  AxisFollowing = 16512, AxisFollowingSibling = 8224, AxisNamespace = 8256, AxisParent = 16640,
  AxisPreceding = 18432, AxisPrecedingSibling = 17408, AxisSelf = 8200
}
 
enum  Constants
 
enum  DocumentOrder { Follows = 1, Is = 0, Precedes = -1 }
  More...
 
enum  NodeKind {
  Attribute = 1, Comment = 2, Document = 4, Element = 8,
  Namespace = 16, ProcessingInstruction = 32, Text = 64
}
  More...
 

Public Member Functions

override bool Equals (object o)
 
override int GetHashCode ()
 
 QXmlNodeModelIndex ()
 
 
 QXmlNodeModelIndex (QXmlNodeModelIndex other)
 
 
virtual void CreateProxy ()
 
new long AdditionalData ()
 
 
new long Data ()
 
 
new bool IsNull ()
 
 
new QAbstractXmlNodeModel Model ()
 
 
new void Reset ()
 
new void Dispose ()
 

Static Public Member Functions

static bool operator!= (QXmlNodeModelIndex arg1, QXmlNodeModelIndex arg2)
 
 
static bool operator== (QXmlNodeModelIndex arg1, QXmlNodeModelIndex arg2)
 
 

Protected Member Functions

 QXmlNodeModelIndex (System.Type dummy)
 

Protected Attributes

SmokeInvocation interceptor
 

Properties

virtual System.IntPtr SmokeObject [get, set]
 

Detailed Description

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

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

A pointer to an XML node model, which is returned by model(), and

Some data, which is returned by data(), internalPointer(), and additionalData().

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.

Send the output of your XQuery to an XML receiver, or

Let your XQuery do all the work to produce the desired result.

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 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.

Member Enumeration Documentation

Enumerator:
AxisAncestor 
AxisAncestorOrSelf 
AxisAttribute 
AxisAttributeOrTop 
AxisChild 
AxisChildOrTop 
AxisDescendant 
AxisDescendantOrSelf 
AxisFollowing 
AxisFollowingSibling 
AxisNamespace 
AxisParent 
AxisPreceding 
AxisPrecedingSibling 
AxisSelf 

Identifies the specific node comparison operator that should be used.

Enumerator:
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.

Precedes 

Signifies the \<\< operator. Test whether the first operand precedes the second in the document.

Identifies a kind of node.

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

See also QAbstractXmlNodeModel::kind().

Enumerator:
Attribute 

Identifies an attribute 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.

Text 

Identifies a text node

Constructor & Destructor Documentation

QtXmlPatterns.QXmlNodeModelIndex.QXmlNodeModelIndex ( System.Type  dummy)
protected
QtXmlPatterns.QXmlNodeModelIndex.QXmlNodeModelIndex ( )

Default constructor. Creates an item that is null.

See also isNull().

QtXmlPatterns.QXmlNodeModelIndex.QXmlNodeModelIndex ( QXmlNodeModelIndex  other)

Standard copy constructor. Creates a QXmlNodeModelIndex instance that is a copy of other.

Member Function Documentation

new long QtXmlPatterns.QXmlNodeModelIndex.AdditionalData ( )

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

See also data().

virtual void QtXmlPatterns.QXmlNodeModelIndex.CreateProxy ( )
virtual
new long QtXmlPatterns.QXmlNodeModelIndex.Data ( )

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

See also additionalData().

new void QtXmlPatterns.QXmlNodeModelIndex.Dispose ( )
override bool QtXmlPatterns.QXmlNodeModelIndex.Equals ( object  o)
override int QtXmlPatterns.QXmlNodeModelIndex.GetHashCode ( )
new bool QtXmlPatterns.QXmlNodeModelIndex.IsNull ( )

Returns true if this QXmlNodeModelIndex is a default constructed value, otherwise false.

A null QXmlNodeModelIndex doesn't represent any node and cannot be used in conjunction with QAbstractXmlNodeModel.

new QAbstractXmlNodeModel QtXmlPatterns.QXmlNodeModelIndex.Model ( )

Returns the QAbstractXmlNodeModel that this node index refers to. QXmlNodeModelIndex does not own QAbstractXmlNodeModel and does not keep track of its lifetime, so this pointer will dangle if the QAbstractXmlNodeModel is deallocated first.

There is no setter for the node model because instances of QXmlNodeModelIndex instances are only created with QAbstractXmlNodeModel::createIndex().

static bool QtXmlPatterns.QXmlNodeModelIndex.operator!= ( QXmlNodeModelIndex  arg1,
QXmlNodeModelIndex  arg2 
)
static

Returns true if other is the same node as this.

static bool QtXmlPatterns.QXmlNodeModelIndex.operator== ( QXmlNodeModelIndex  arg1,
QXmlNodeModelIndex  arg2 
)
static

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.

new void QtXmlPatterns.QXmlNodeModelIndex.Reset ( )

Member Data Documentation

SmokeInvocation QtXmlPatterns.QXmlNodeModelIndex.interceptor
protected

Property Documentation

virtual System.IntPtr QtXmlPatterns.QXmlNodeModelIndex.SmokeObject
getset