Qt 4.8
Public Functions | Private Functions | Properties | Friends | List of all members
QXmlNamePool Class Reference

The QXmlNamePool class is a table of shared strings referenced by instances of QXmlName. More...

#include <qxmlnamepool.h>

Public Functions

QXmlNamePooloperator= (const QXmlNamePool &other)
 Assigns the other name pool to this one. More...
 
 QXmlNamePool ()
 Constructs an empty name pool. More...
 
 QXmlNamePool (const QXmlNamePool &other)
 Constructs a copy of the other name pool. More...
 
 ~QXmlNamePool ()
 Destroys the name pool. More...
 

Private Functions

 QXmlNamePool (QPatternist::NamePool *namePool)
 

Properties

QExplicitlySharedDataPointer< QPatternist::NamePoold
 

Friends

class QPatternist::XsdSchemaParser
 
class QPatternist::XsdValidatingInstanceReader
 
class QPatternistSDK::Global
 
class QXmlName
 
class QXmlQuery
 
class QXmlQueryPrivate
 
class QXmlSchemaPrivate
 
class QXmlSchemaValidatorPrivate
 
class QXmlSerializerPrivate
 

Detailed Description

The QXmlNamePool class is a table of shared strings referenced by instances of QXmlName.

Note
This class or function is reentrant.
Since
4.4

QXmlNamePool is used to optimize operations on instances of QXmlName. An instance of QXmlName represents an XML name in a way that allows the XML name to be compared and passed around efficiently. The efficiency is achieved by storing the strings comprising the XML names in an instance of QXmlNamePool, where they are mapped to binary identifiers, which are then packed into a key which is stored in the QXmlName.

This means that each instance of QXmlName is tied to the name pool it was created with, and that name pool should be kept in scope and used to create all instances of QXmlName that might be compared. Note also that the name pool is required if you must reconstitute the QXmlName as text, or if you must access any of its component strings, so although instances of QXmlName can be compared without reference to a name pool, the name pool must be kept in scope if the name's strings must be accessed later.

See also
QXmlName
QXmlQuery::namePool()

Definition at line 69 of file qxmlnamepool.h.

Constructors and Destructors

◆ QXmlNamePool() [1/3]

QXmlNamePool::QXmlNamePool ( )

Constructs an empty name pool.

Definition at line 82 of file qxmlnamepool.cpp.

82  : d(new QPatternist::NamePool())
83 {
84 }
Store names such as namespace bindings and QNames and allows them to be referenced in efficient ways...
Definition: qnamepool_p.h:87
QExplicitlySharedDataPointer< QPatternist::NamePool > d
Definition: qxmlnamepool.h:88

◆ QXmlNamePool() [2/3]

QXmlNamePool::QXmlNamePool ( const QXmlNamePool other)

Constructs a copy of the other name pool.

Definition at line 89 of file qxmlnamepool.cpp.

89  : d(other.d)
90 {
91 }
QExplicitlySharedDataPointer< QPatternist::NamePool > d
Definition: qxmlnamepool.h:88

◆ ~QXmlNamePool()

QXmlNamePool::~QXmlNamePool ( )

Destroys the name pool.

Instances of QXmlName constructed with this name pool can still be compared after this destructor is called, but their text strings cannot be accessed.

Definition at line 98 of file qxmlnamepool.cpp.

99 {
100 }

◆ QXmlNamePool() [3/3]

QXmlNamePool::QXmlNamePool ( QPatternist::NamePool namePool)
private

Definition at line 102 of file qxmlnamepool.cpp.

103 {
104 }
QExplicitlySharedDataPointer< QPatternist::NamePool > d
Definition: qxmlnamepool.h:88

Functions

◆ operator=()

QXmlNamePool & QXmlNamePool::operator= ( const QXmlNamePool other)

Assigns the other name pool to this one.

Definition at line 109 of file qxmlnamepool.cpp.

110 {
111  d = other.d;
112  return *this;
113 }
QExplicitlySharedDataPointer< QPatternist::NamePool > d
Definition: qxmlnamepool.h:88

Friends and Related Functions

◆ QPatternist::XsdSchemaParser

Definition at line 85 of file qxmlnamepool.h.

◆ QPatternist::XsdValidatingInstanceReader

Definition at line 86 of file qxmlnamepool.h.

◆ QPatternistSDK::Global

friend class QPatternistSDK::Global
friend

Definition at line 87 of file qxmlnamepool.h.

◆ QXmlName

friend class QXmlName
friend

Definition at line 84 of file qxmlnamepool.h.

◆ QXmlQuery

friend class QXmlQuery
friend

Definition at line 80 of file qxmlnamepool.h.

◆ QXmlQueryPrivate

friend class QXmlQueryPrivate
friend

Definition at line 79 of file qxmlnamepool.h.

◆ QXmlSchemaPrivate

friend class QXmlSchemaPrivate
friend

Definition at line 81 of file qxmlnamepool.h.

◆ QXmlSchemaValidatorPrivate

Definition at line 82 of file qxmlnamepool.h.

◆ QXmlSerializerPrivate

Definition at line 83 of file qxmlnamepool.h.

Properties

◆ d


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