te::xsd::QName Class Reference

A class to be used to represent XML qualified names. More...

#include <QName.h>

Public Member Functions

const std::string & getLocalPart () const
 It returns the local part of the qualified name. More...
 
const std::string & getPrefix () const
 It returns the namespace prefix part of the qualified name. More...
 
std::string getQualifiedName () const
 It returns the qualified name based on prefix and local part. More...
 
QNameoperator= (const QName &rhs)
 Assignment operator. More...
 
 QName ()
 Constructor. More...
 
 QName (const std::string &prefix, const std::string &localPart)
 Constructor. More...
 
 QName (const QName &rhs)
 Copy constructor. More...
 
void setLocalPart (const std::string &localPart)
 It sets the local part of the qualified name. More...
 
void setPrefix (const std::string &prefix)
 It sets the namespace prefix part of the qualified name. More...
 
 ~QName ()
 Destructor. More...
 

Private Attributes

std::string m_localPart
 The local part of the qualified name. More...
 
std::string m_prefix
 The namespace prefix part of the qualified name. It must be associated with a namespace URI reference in the namespace declaration. More...
 

Detailed Description

A class to be used to represent XML qualified names.

Since URI references can be long and may contain prohibited characters for element/attribute naming, QNames are used to create a mapping between the URI and a namespace prefix. The mapping enables the abbreviation of URIs, therefore it achieves a more convenient way to write XML documents. For more details see: http://www.w3.org/TR/REC-xml-names/#ns-qualnames.

Definition at line 49 of file QName.h.

Constructor & Destructor Documentation

te::xsd::QName::QName ( )

Constructor.

te::xsd::QName::QName ( const std::string &  prefix,
const std::string &  localPart 
)

Constructor.

Parameters
prefixThe namespace prefix part of the qualified name.
localPartThe local part of the qualified name.
te::xsd::QName::QName ( const QName rhs)

Copy constructor.

Parameters
rhsRight-hand-side object.
te::xsd::QName::~QName ( )

Destructor.

Member Function Documentation

const std::string& te::xsd::QName::getLocalPart ( ) const

It returns the local part of the qualified name.

Returns
The local part of the qualified name.
const std::string& te::xsd::QName::getPrefix ( ) const

It returns the namespace prefix part of the qualified name.

Returns
The namespace prefix part of the qualified name.
std::string te::xsd::QName::getQualifiedName ( ) const

It returns the qualified name based on prefix and local part.

Returns
The qualified name.
QName& te::xsd::QName::operator= ( const QName rhs)

Assignment operator.

Parameters
rhsRight-hand-side object.
Returns
A reference to this object.
void te::xsd::QName::setLocalPart ( const std::string &  localPart)

It sets the local part of the qualified name.

Parameters
localPartThe local part of the qualified name.
void te::xsd::QName::setPrefix ( const std::string &  prefix)

It sets the namespace prefix part of the qualified name.

Parameters
prefixThe namespace prefix part of the qualified name.

Member Data Documentation

std::string te::xsd::QName::m_localPart
private

The local part of the qualified name.

Definition at line 121 of file QName.h.

std::string te::xsd::QName::m_prefix
private

The namespace prefix part of the qualified name. It must be associated with a namespace URI reference in the namespace declaration.

Definition at line 120 of file QName.h.


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