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

Base class for namespace resolvers. More...

#include <qnamespaceresolver_p.h>

Inheritance diagram for QPatternist::NamespaceResolver:
QSharedData QPatternist::DelegatingNamespaceResolver QPatternist::GenericNamespaceResolver QPatternist::NodeNamespaceResolver

Public Types

typedef QHash< QXmlName::PrefixCode, QXmlName::NamespaceCodeBindings
 
enum  Constants { NoBinding = -1 }
 
typedef QExplicitlySharedDataPointer< NamespaceResolverPtr
 

Public Functions

virtual void addBinding (const QXmlName nb)=0
 
virtual Bindings bindings () const =0
 
virtual QXmlName::NamespaceCode lookupNamespaceURI (const QXmlName::PrefixCode prefix) const =0
 
 NamespaceResolver ()
 
virtual ~NamespaceResolver ()
 
- 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
 

Detailed Description

Base class for namespace resolvers.

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

Definition at line 74 of file qnamespaceresolver_p.h.

Typedefs

◆ Bindings

A list of namespace bindings. The key is the prefix, and the value is the namespace URI.

Definition at line 88 of file qnamespaceresolver_p.h.

◆ Ptr

Definition at line 82 of file qnamespaceresolver_p.h.

Enumerations

◆ Constants

Enumerator
NoBinding 

Definition at line 77 of file qnamespaceresolver_p.h.

Constructors and Destructors

◆ NamespaceResolver()

NamespaceResolver::NamespaceResolver ( )

Definition at line 49 of file qnamespaceresolver.cpp.

50 {
51 }

◆ ~NamespaceResolver()

NamespaceResolver::~NamespaceResolver ( )
virtual

Definition at line 53 of file qnamespaceresolver.cpp.

54 {
55 }

Functions

◆ addBinding()

virtual void QPatternist::NamespaceResolver::addBinding ( const QXmlName  nb)
pure virtual

Adds the mapping from prefix to namespaceURI to this NamespaceResolver. If this NamespaceResolver already contains a binding involving prefix, the old binding is replaced.

Implemented in QPatternist::DelegatingNamespaceResolver, QPatternist::NodeNamespaceResolver, and QPatternist::GenericNamespaceResolver.

◆ bindings()

virtual Bindings QPatternist::NamespaceResolver::bindings ( ) const
pure virtual

◆ lookupNamespaceURI()

virtual QXmlName::NamespaceCode QPatternist::NamespaceResolver::lookupNamespaceURI ( const QXmlName::PrefixCode  prefix) const
pure virtual

Resolves the prefix to the corresponding namespace URI. If no binding exists for prefix, NoBinding is returned.

Returns
the namespace corresponding to prefix.

Implemented in QPatternist::DelegatingNamespaceResolver, QPatternist::NodeNamespaceResolver, and QPatternist::GenericNamespaceResolver.

Referenced by QPatternist::DelegatingNamespaceResolver::lookupNamespaceURI(), and QPatternist::QNameConstructor::namespaceForPrefix().


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