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

Receives QAbstractXmlReceiver events and builds a node tree in memory that afterwards can be retrieved via builtNode() More...

#include <qnodebuilder_p.h>

Inheritance diagram for QPatternist::NodeBuilder:
QPatternist::QAbstractXmlReceiver QSharedData QPatternist::AccelTreeBuilder< true > QPatternist::AccelTreeBuilder< FromDocument >

Public Types

typedef AutoPtr< NodeBuilderPtr
 
- Public Types inherited from QPatternist::QAbstractXmlReceiver
typedef QExplicitlySharedDataPointer< QAbstractXmlReceiverPtr
 

Public Functions

virtual QAbstractXmlNodeModel::Ptr builtDocument ()=0
 Returns the document that has been built. More...
 
virtual NodeBuilder::Ptr create (const QUrl &baseURI) const =0
 Creates a copy of this NodeBuilder, that operates independently of this NodeBuilder. More...
 
 NodeBuilder ()
 
- Public Functions inherited from QPatternist::QAbstractXmlReceiver
virtual void attribute (const QXmlName name, const QString &value)=0
 Signals the presence of an attribute node. More...
 
virtual void characters (const QString &value)=0
 
virtual void comment (const QString &value)=0
 
virtual void endDocument ()=0
 
virtual void endElement ()=0
 Signals the end of the current element. More...
 
virtual void item (const Item &item)=0
 Sends an Item to this QAbstractXmlReceiver that may be a QXmlNodeModelIndex or an AtomicValue. More...
 
virtual void namespaceBinding (const QXmlName &nb)=0
 Signals the presence of the namespace declaration nb. More...
 
virtual void processingInstruction (const QXmlName name, const QString &value)=0
 
 QAbstractXmlReceiver ()
 
virtual void startDocument ()=0
 
virtual void startElement (const QXmlName name)=0
 Signals the start of an element by name name. More...
 
virtual void whitespaceOnly (const QStringRef &value)
 
virtual ~QAbstractXmlReceiver ()
 
- Public Functions inherited from QSharedData
 QSharedData ()
 Constructs a QSharedData object with a reference count of 0. More...
 
 QSharedData (const QSharedData &)
 Constructs a QSharedData object with reference count 0. More...
 

Additional Inherited Members

- Public Variables inherited from QSharedData
QAtomicInt ref
 
- Protected Functions inherited from QPatternist::QAbstractXmlReceiver
void sendAsNode (const Item &outputItem)
 

Detailed Description

Receives QAbstractXmlReceiver events and builds a node tree in memory that afterwards can be retrieved via builtNode()

Author
Frans Englich frans.nosp@m..eng.nosp@m.lich@.nosp@m.noki.nosp@m.a.com

Definition at line 72 of file qnodebuilder_p.h.

Typedefs

◆ Ptr

Definition at line 75 of file qnodebuilder_p.h.

Constructors and Destructors

◆ NodeBuilder()

QPatternist::NodeBuilder::NodeBuilder ( )
inline

Definition at line 77 of file qnodebuilder_p.h.

78  {
79  }

Functions

◆ builtDocument()

virtual QAbstractXmlNodeModel::Ptr QPatternist::NodeBuilder::builtDocument ( )
pure virtual

Returns the document that has been built.

If this function is called before any events have been received, the result is undefined.

The top node that was constructed can be retrieved by calling NodeModel::root() on the returned NodeModel.

This function is not const, because some implementations delay the node construction until the node is needed. Also, text nodes are difficult, at best, to construct until one knows that all text content has been received(which a call to this function in a natural way signals).

Implemented in QPatternist::AccelTreeBuilder< FromDocument >, and QPatternist::AccelTreeBuilder< true >.

Referenced by NodeBuilder().

◆ create()

virtual NodeBuilder::Ptr QPatternist::NodeBuilder::create ( const QUrl baseURI) const
pure virtual

Creates a copy of this NodeBuilder, that operates independently of this NodeBuilder.

The caller owns the returned instance.

Implemented in QPatternist::AccelTreeBuilder< FromDocument >, and QPatternist::AccelTreeBuilder< true >.

Referenced by NodeBuilder(), and QPatternist::GenericDynamicContext::nodeBuilder().


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