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

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

#include <types.hxx>

Inheritance diagram for name< C, B >:

Constructors

 name (const C *s)
 Initialize an instance with a copy of a C string.
 
 name (const C *s, std::size_t n)
 Initialize an instance with a character array.
 
 name (std::size_t n, C c)
 Initialize an instance with multiple copies of the same character.
 
 name (const std::basic_string< C > &s)
 Initialize an instance with a copy of a standard string.
 
 name (const std::basic_string< C > &s, std::size_t pos, std::size_t n=std::basic_string< C >::npos)
 Initialize an instance with a copy of a substring.
 
 name (const name &x, flags f=0, container *c=0)
 Copy constructor.
 
virtual name_clone (flags f=0, container *c=0) const
 Copy the instance polymorphically.
 
template<typename S >
 name (istream< S > &s, flags f=0, container *c=0)
 Create an instance from a data representation stream.
 
 name (const xercesc::DOMElement &e, flags f=0, container *c=0)
 Create an instance from a DOM element.
 
 name (const xercesc::DOMAttr &a, flags f=0, container *c=0)
 Create an instance from a DOM Attribute.
 
 name (const std::basic_string< C > &s, const xercesc::DOMElement *e, flags f=0, container *c=0)
 Create an instance from a string fragment.
 
nameoperator= (C c)
 Assign a character to the instance.
 
nameoperator= (const C *s)
 Assign a C string to the instance.
 
nameoperator= (const std::basic_string< C > &s)
 Assign a standard string to the instance.
 
nameoperator= (const name &x)
 Copy assignment operator.
 

Detailed Description

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

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

The name class publicly inherits from and has the same set of constructors as std::basic_string. It therefore can be used as std::string (or std::wstring if you are using wchar_t as the character type).

Constructor & Destructor Documentation

◆ name() [1/10]

template<typename C , typename B >
name ( const C *  s)
inline

Initialize an instance with a copy of a C string.

Parameters
sA C string to copy.

◆ name() [2/10]

template<typename C , typename B >
name ( const C *  s,
std::size_t  n 
)
inline

Initialize an instance with a character array.

Parameters
sA character array to copy.
nA number of character to copy.

◆ name() [3/10]

template<typename C , typename B >
name ( std::size_t  n,
c 
)
inline

Initialize an instance with multiple copies of the same character.

Parameters
nA number of copies to create.
cA character to copy.

◆ name() [4/10]

template<typename C , typename B >
name ( const std::basic_string< C > &  s)
inline

Initialize an instance with a copy of a standard string.

Parameters
sA standard string to copy.

◆ name() [5/10]

template<typename C , typename B >
name ( const std::basic_string< C > &  s,
std::size_t  pos,
std::size_t  n = std::basic_string<C>::npos 
)
inline

Initialize an instance with a copy of a substring.

Parameters
sA standard string to copy the substring from.
posAn index of the first character to copy from.
nA number of characters to copy.

◆ name() [6/10]

template<typename C , typename B >
name ( const name< C, B > &  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.

◆ name() [7/10]

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

◆ name() [8/10]

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

◆ name() [9/10]

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

◆ name() [10/10]

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

◆ operator=() [1/4]

template<typename C , typename B >
name & operator= ( c)
inline

Assign a character to the instance.

The resulting name has only one character.

Parameters
cA character to assign.
Returns
A reference to the instance.

◆ operator=() [2/4]

template<typename C , typename B >
name & operator= ( const C *  s)
inline

Assign a C string to the instance.

The resulting name contains a copy of the C string.

Parameters
sA C string to assign.
Returns
A reference to the instance.

◆ operator=() [3/4]

template<typename C , typename B >
name & operator= ( const std::basic_string< C > &  s)
inline

Assign a standard string to the instance.

The resulting name contains a copy of the standard string.

Parameters
sA standard string to assign.
Returns
A reference to the instance.

◆ operator=() [4/4]

template<typename C , typename B >
name & operator= ( const name< C, B > &  x)
inline

Copy assignment operator.

Parameters
xAn instance to assign.
Returns
A reference to the instance.

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

Copyright © 2005-2023 Code Synthesis.