id Class Template Reference

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

List of all members.

Constructors

 id (const C *s)
 Initialize an instance with a copy of a C string.
 id (const C *s, std::size_t n)
 Initialize an instance with a character array.
 id (std::size_t n, C c)
 Initialize an instance with multiple copies of the same character.
 id (const std::basic_string< C > &s)
 Initialize an instance with a copy of a standard string.
 id (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.
 id (const id &x, flags f=0, container *c=0)
 Copy constructor.
virtual id_clone (flags f=0, container *c=0) const
 Copy the instance polymorphically.
template<typename S>
 id (istream< S > &s, flags f=0, container *c=0)
 Create an instance from a data representation stream.
 id (const xercesc::DOMElement &e, flags f=0, container *c=0)
 Create an instance from a DOM element.
 id (const xercesc::DOMAttr &a, flags f=0, container *c=0)
 Create an instance from a DOM Attribute.
 id (const std::basic_string< C > &s, const xercesc::DOMElement *e, flags f=0, container *c=0)
 Create an instance from a string fragment.

Public Member Functions

idoperator= (C c)
 Assign a character to the instance.
idoperator= (const C *s)
 Assign a C string to the instance.
idoperator= (const std::basic_string< C > &s)
 Assign a standard string to the instance.
idoperator= (const id &x)
 Copy assignment operator.


Detailed Description

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

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

The id 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

id ( const C *  s  )  [inline]

Initialize an instance with a copy of a C string.

Parameters:
s A C string to copy.

id ( const C *  s,
std::size_t  n 
) [inline]

Initialize an instance with a character array.

Parameters:
s A character array to copy.
n A number of character to copy.

id ( std::size_t  n,
c 
) [inline]

Initialize an instance with multiple copies of the same character.

Parameters:
n A number of copies to create.
c A character to copy.

id ( const std::basic_string< C > &  s  )  [inline]

Initialize an instance with a copy of a standard string.

Parameters:
s A standard string to copy.

id ( 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:
s A standard string to copy the substring from.
pos An index of the first character to copy from.
n A number of characters to copy.

id ( const id< C, B > &  x,
flags  f = 0,
container c = 0 
) [inline]

Copy constructor.

Parameters:
x An instance to make a copy of.
f Flags to create the copy with.
c A pointer to the object that will contain the copy.
For polymorphic object models use the _clone function instead.

id ( istream< S > &  s,
flags  f = 0,
container c = 0 
) [inline]

Create an instance from a data representation stream.

Parameters:
s A stream to extract the data from.
f Flags to create the new instance with.
c A pointer to the object that will contain the new instance.

id ( const xercesc::DOMElement &  e,
flags  f = 0,
container c = 0 
)

Create an instance from a DOM element.

Parameters:
e A DOM element to extract the data from.
f Flags to create the new instance with.
c A pointer to the object that will contain the new instance.

id ( const xercesc::DOMAttr &  a,
flags  f = 0,
container c = 0 
)

Create an instance from a DOM Attribute.

Parameters:
a A DOM attribute to extract the data from.
f Flags to create the new instance with.
c A pointer to the object that will contain the new instance.

id ( const std::basic_string< C > &  s,
const xercesc::DOMElement *  e,
flags  f = 0,
container c = 0 
)

Create an instance from a string fragment.

Parameters:
s A string fragment to extract the data from.
e A pointer to DOM element containing the string fragment.
f Flags to create the new instance with.
c A pointer to the object that will contain the new instance.


Member Function Documentation

virtual id* _clone ( flags  f = 0,
container c = 0 
) const [virtual]

Copy the instance polymorphically.

Parameters:
f Flags to create the copy with.
c A 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.

id& operator= ( c  ) 

Assign a character to the instance.

The resulting id has only one character.

Parameters:
c A character to assign.
Returns:
A reference to the instance.

id& operator= ( const C *  s  ) 

Assign a C string to the instance.

The resulting id contains a copy of the C string.

Parameters:
s A C string to assign.
Returns:
A reference to the instance.

id& operator= ( const std::basic_string< C > &  s  ) 

Assign a standard string to the instance.

The resulting id contains a copy of the standard string.

Parameters:
s A standard string to assign.
Returns:
A reference to the instance.

id& operator= ( const id< C, B > &  x  ) 

Copy assignment operator.

Parameters:
x An instance to assign.
Returns:
A reference to the instance.


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

Copyright © 2005-2010 CODE SYNTHESIS TOOLS CC