C++/Tree Mapping Runtime Library
List of all members
qname< C, B, uri, ncname > Class Template Reference

Class corresponding to the XML Schema QName built-in type. More...

#include <types.hxx>

Inheritance diagram for qname< C, B, uri, ncname >:

Constructors

 qname (const ncname &n)
 Initialize an instance with a name only.
 
 qname (const uri &ns, const ncname &n)
 Initialize an instance with a name and a namespace.
 
 qname (const qname &x, flags f=0, container *c=0)
 Copy constructor.
 
virtual qname_clone (flags f=0, container *c=0) const
 Copy the instance polymorphically.
 
template<typename S >
 qname (istream< S > &s, flags f=0, container *c=0)
 Create an instance from a data representation stream.
 
 qname (const xercesc::DOMElement &e, flags f=0, container *c=0)
 Create an instance from a DOM element.
 
 qname (const xercesc::DOMAttr &a, flags f=0, container *c=0)
 Create an instance from a DOM Attribute.
 
 qname (const std::basic_string< C > &s, const xercesc::DOMElement *e, flags f=0, container *c=0)
 Create an instance from a string fragment.
 
bool qualified () const
 Determine if the name is qualified.
 
const urinamespace_ () const
 Get XML namespace.
 
const ncnamename () const
 Get XML name.
 

Detailed Description

template<typename C, typename B, typename uri, typename ncname>
class xsd::cxx::tree::qname< C, B, uri, ncname >

Class corresponding to the XML Schema QName built-in type.

The qname class represents a potentially namespace-qualified XML name.

Constructor & Destructor Documentation

◆ qname() [1/7]

template<typename C , typename B , typename uri , typename ncname >
qname ( const ncname n)
inline

Initialize an instance with a name only.

The resulting qname is unqualified.

Parameters
nAn XML name (ncname).

◆ qname() [2/7]

template<typename C , typename B , typename uri , typename ncname >
qname ( const uri ns,
const ncname n 
)
inline

Initialize an instance with a name and a namespace.

The resulting qname is qualified.

Parameters
nsAn XML namespace (uri).
nAn XML name (ncname).

◆ qname() [3/7]

template<typename C , typename B , typename uri , typename ncname >
qname ( const qname< C, B, uri, ncname > &  x,
flags  f = 0,
container c = 0 
)
inline

Copy constructor.

Parameters
xAn instance to make a copy of.
fFlags to create the copy with.
cA pointer to the object that will contain the copy.

For polymorphic object models use the _clone function instead.

◆ qname() [4/7]

template<typename C , typename B , typename uri , typename ncname >
template<typename S >
qname ( istream< S > &  s,
flags  f = 0,
container c = 0 
)

Create an instance from a data representation stream.

Parameters
sA stream to extract the data from.
fFlags to create the new instance with.
cA pointer to the object that will contain the new instance.

◆ qname() [5/7]

template<typename C , typename B , typename uri , typename ncname >
qname ( const xercesc::DOMElement &  e,
flags  f = 0,
container c = 0 
)

Create an instance from a DOM element.

Parameters
eA DOM element to extract the data from.
fFlags to create the new instance with.
cA pointer to the object that will contain the new instance.

◆ qname() [6/7]

template<typename C , typename B , typename uri , typename ncname >
qname ( const xercesc::DOMAttr &  a,
flags  f = 0,
container c = 0 
)

Create an instance from a DOM Attribute.

Parameters
aA DOM attribute to extract the data from.
fFlags to create the new instance with.
cA pointer to the object that will contain the new instance.

◆ qname() [7/7]

template<typename C , typename B , typename uri , typename ncname >
qname ( const std::basic_string< C > &  s,
const xercesc::DOMElement *  e,
flags  f = 0,
container c = 0 
)

Create an instance from a string fragment.

Parameters
sA string fragment to extract the data from.
eA pointer to DOM element containing the string fragment.
fFlags to create the new instance with.
cA pointer to the object that will contain the new instance.

Member Function Documentation

◆ _clone()

template<typename C , typename B , typename uri , typename ncname >
virtual qname * _clone ( flags  f = 0,
container c = 0 
) const
virtual

Copy the instance polymorphically.

Parameters
fFlags to create the copy with.
cA pointer to the object that will contain the copy.
Returns
A pointer to the dynamically allocated copy.

This function ensures that the dynamic type of the instance is used for copying and should be used for polymorphic object models instead of the copy constructor.

◆ qualified()

template<typename C , typename B , typename uri , typename ncname >
bool qualified ( ) const
inline

Determine if the name is qualified.

Returns
True if the name is qualified, false otherwise.

◆ namespace_()

template<typename C , typename B , typename uri , typename ncname >
const uri & namespace_ ( ) const
inline

Get XML namespace.

Returns
A constant reference to qualifying XML namespace.

Referenced by xsd::cxx::tree::operator==().

◆ name()

template<typename C , typename B , typename uri , typename ncname >
const ncname & name ( ) const
inline

Get XML name.

Returns
A constant reference to unqualified XML name.

Referenced by xsd::cxx::tree::operator==().


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

Copyright © 2005-2023 Code Synthesis.