Qt 4.8
Public Types | Public Functions | Properties | List of all members
QPatternist::AbstractXmlPullProvider Class Referenceabstract

#include <qabstractxmlpullprovider_p.h>

Inheritance diagram for QPatternist::AbstractXmlPullProvider:
QPatternist::PullBridge

Public Types

enum  Event {
  StartOfInput = 1, AtomicValue = 1 << 1, StartDocument = 1 << 2, EndDocument = 1 << 3,
  StartElement = 1 << 4, EndElement = 1 << 5, Text = 1 << 6, ProcessingInstruction = 1 << 7,
  Comment = 1 << 8, Attribute = 1 << 9, Namespace = 1 << 10, EndOfInput = 1 << 11
}
 

Public Functions

 AbstractXmlPullProvider ()
 Constucts a AbstractXmlPullProvider instance. More...
 
virtual QVariant atomicValue () const =0
 If current() event is AtomicValue, the atomic value is returned as a QVariant. More...
 
virtual QHash< QXmlName, QXmlItemattributeItems ()=0
 
virtual QHash< QXmlName, QStringattributes ()=0
 If the current() is Element, the attributes of the element are returned, an empty list of attributes otherwise. More...
 
virtual Event current () const =0
 Returns the event that next() returned the last time it was called. More...
 
virtual QXmlName name () const =0
 If the current event is StartElement, EndElement, ProcessingInstruction, Attribute, or Namespace, the node's name is returned. More...
 
virtual Event next ()=0
 Advances this AbstractXmlPullProvider, and returns the new event. More...
 
virtual QString stringValue () const =0
 If current() is Text, the text node's value is returned. More...
 
virtual ~AbstractXmlPullProvider ()
 Destructs this AbstractXmlPullProvider. More...
 

Properties

AbstractXmlPullProviderPrivate * d
 

Detailed Description

Definition at line 71 of file qabstractxmlpullprovider_p.h.

Enumerations

◆ Event

Enumerator
StartOfInput 
AtomicValue 
StartDocument 
EndDocument 
StartElement 
EndElement 
Text 
ProcessingInstruction 
Comment 
Attribute 
Namespace 
EndOfInput 

Definition at line 77 of file qabstractxmlpullprovider_p.h.

Constructors and Destructors

◆ AbstractXmlPullProvider()

AbstractXmlPullProvider::AbstractXmlPullProvider ( )

Constucts a AbstractXmlPullProvider instance.

Definition at line 108 of file qabstractxmlpullprovider.cpp.

109 {
110 }

◆ ~AbstractXmlPullProvider()

AbstractXmlPullProvider::~AbstractXmlPullProvider ( )
virtual

Destructs this AbstractXmlPullProvider.

Definition at line 115 of file qabstractxmlpullprovider.cpp.

116 {
117 }

Functions

◆ atomicValue()

QVariant AbstractXmlPullProvider::atomicValue ( ) const
pure virtual

If current() event is AtomicValue, the atomic value is returned as a QVariant.

In all other cases, this function returns a null QVariant.

Implemented in QPatternist::PullBridge.

◆ attributeItems()

virtual QHash<QXmlName, QXmlItem> QPatternist::AbstractXmlPullProvider::attributeItems ( )
pure virtual

Implemented in QPatternist::PullBridge.

◆ attributes()

QHash< QXmlName, QString > AbstractXmlPullProvider::attributes ( )
pure virtual

If the current() is Element, the attributes of the element are returned, an empty list of attributes otherwise.

Implemented in QPatternist::PullBridge.

◆ current()

Event AbstractXmlPullProvider::current ( ) const
pure virtual

Returns the event that next() returned the last time it was called.

It doesn't alter this AbstractXmlPullProvider.

current() may not modify this AbstractXmlPullProvider's state. Subsequent calls to current() must return the same value.

See also
AbstractXmlPullProvider::Event

Implemented in QPatternist::PullBridge.

◆ name()

QName AbstractXmlPullProvider::name ( ) const
pure virtual

If the current event is StartElement, EndElement, ProcessingInstruction, Attribute, or Namespace, the node's name is returned.

If the current event is ProcessingInstruction, the processing instruction target is in in the local name.

If the current event is Namespace, the name's namespace URI is the namespace, and the local name is the prefix the name is binding to.

In all other cases, an invalid QName is returned.

Implemented in QPatternist::PullBridge.

◆ next()

Event AbstractXmlPullProvider::next ( )
pure virtual

Advances this AbstractXmlPullProvider, and returns the new event.

See also
current()

Implemented in QPatternist::PullBridge.

◆ stringValue()

QString AbstractXmlPullProvider::stringValue ( ) const
pure virtual

If current() is Text, the text node's value is returned.

If the current() event is Comment, its value is returned. The subclasser guarantees it does not contain the string "-->".

If the current() event is ProcessingInstruction, its data is returned. The subclasser guarantees the data does not contain the string "?>".

In other cases, it returns a default constructed string.

Implemented in QPatternist::PullBridge.

Properties

◆ d

AbstractXmlPullProviderPrivate* QPatternist::AbstractXmlPullProvider::d
private

Definition at line 105 of file qabstractxmlpullprovider_p.h.


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