Qt 4.8
Public Functions | Properties | List of all members
QPatternist::ElementNamespaceHandler Class Reference

A helper class for automatically handling namespace scopes of elements. More...

Public Functions

 ElementNamespaceHandler (const XsdSchemaToken::NodeName &tag, XsdSchemaParser *parser)
 
 ~ElementNamespaceHandler ()
 

Properties

XsdSchemaParserm_parser
 

Detailed Description

A helper class for automatically handling namespace scopes of elements.

This class should be instantiated at the beginning of each parse XYZ method.

Definition at line 113 of file qxsdschemaparser.cpp.

Constructors and Destructors

◆ ElementNamespaceHandler()

QPatternist::ElementNamespaceHandler::ElementNamespaceHandler ( const XsdSchemaToken::NodeName tag,
XsdSchemaParser parser 
)
inline

Creates a new element namespace handler object.

It checks whether the parser is on the right tag and it creates a new namespace context that contains the inherited and local namespace declarations.

Definition at line 122 of file qxsdschemaparser.cpp.

123  : m_parser(parser)
124  {
126  Q_UNUSED(tag)
129  }
static NodeName toToken(const QString &value)
QStringRef name() const
Returns the local name of a StartElement, EndElement, or an EntityReference.
#define Q_ASSERT(cond)
Definition: qglobal.h:1823
QStringRef namespaceUri() const
Returns the namespaceUri of a StartElement or EndElement.
bool isStartElement() const
Returns true if tokenType() equals StartElement ; otherwise returns false.
Definition: qxmlstream.h:337
QXmlStreamNamespaceDeclarations namespaceDeclarations() const
If the state() is StartElement , this function returns the element's namespace declarations.
#define Q_UNUSED(x)
Indicates to the compiler that the parameter with the specified name is not used in the body of a fun...
Definition: qglobal.h:1729
void setPrefixes(const QXmlStreamNamespaceDeclarations &declarations)

◆ ~ElementNamespaceHandler()

QPatternist::ElementNamespaceHandler::~ElementNamespaceHandler ( )
inline

Destroys the element namespace handler object.

It destroys the local namespace context.

Definition at line 136 of file qxsdschemaparser.cpp.

Properties

◆ m_parser

XsdSchemaParser* QPatternist::ElementNamespaceHandler::m_parser
private

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