C++/Tree Mapping Runtime Library
List of all members
nmtokens< C, B, nmtoken > Class Template Reference

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

#include <types.hxx>

Inheritance diagram for nmtokens< C, B, nmtoken >:

Constructors

 nmtokens ()
 Default constructor creates no elements.
 
 nmtokens (typename base_type::size_type n, const nmtoken &x)
 Initialize the instance with copies of an exemplar elements.
 
template<typename I >
 nmtokens (const I &begin, const I &end)
 Initialize the instance with copies of elements from an iterator range.
 
 nmtokens (const nmtokens &x, flags f, container *c=0)
 Copy constructor.
 
virtual nmtokens_clone (flags f=0, container *c=0) const
 Copy the instance polymorphically.
 
template<typename S >
 nmtokens (istream< S > &s, flags f=0, container *c=0)
 Create an instance from a data representation stream.
 
 nmtokens (const xercesc::DOMElement &e, flags f=0, container *c=0)
 Create an instance from a DOM element.
 
 nmtokens (const xercesc::DOMAttr &a, flags f=0, container *c=0)
 Create an instance from a DOM Attribute.
 
 nmtokens (const std::basic_string< C > &s, const xercesc::DOMElement *e, flags f=0, container *c=0)
 Create an instance from a string fragment.
 

Detailed Description

template<typename C, typename B, typename nmtoken>
class xsd::cxx::tree::nmtokens< C, B, nmtoken >

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

The nmtokens class is a vector (or list in XML Schema terminology) of nmtoken elements. It is implemented in terms of the list class template.

Constructor & Destructor Documentation

◆ nmtokens() [1/7]

template<typename C , typename B , typename nmtoken >
nmtokens ( typename base_type::size_type  n,
const nmtoken x 
)
inline

Initialize the instance with copies of an exemplar elements.

Parameters
nA number of elements to copy.
xAn exemplar element to copy.

◆ nmtokens() [2/7]

template<typename C , typename B , typename nmtoken >
template<typename I >
nmtokens ( const I &  begin,
const I &  end 
)
inline

Initialize the instance with copies of elements from an iterator range.

Parameters
beginAn iterator pointing to the first element.
endAn iterator pointing to the one past the last element.

◆ nmtokens() [3/7]

template<typename C , typename B , typename nmtoken >
nmtokens ( const nmtokens< C, B, nmtoken > &  x,
flags  f,
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.

◆ nmtokens() [4/7]

template<typename C , typename B , typename nmtoken >
template<typename S >
nmtokens ( 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.

◆ nmtokens() [5/7]

template<typename C , typename B , typename nmtoken >
nmtokens ( 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.

◆ nmtokens() [6/7]

template<typename C , typename B , typename nmtoken >
nmtokens ( 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.

◆ nmtokens() [7/7]

template<typename C , typename B , typename nmtoken >
nmtokens ( 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 nmtoken >
virtual nmtokens * _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.


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

Copyright © 2005-2023 Code Synthesis.