C++/Tree Mapping Runtime Library
|
Class corresponding to the XML Schema IDREF built-in type. More...
#include <types.hxx>
Public Types | |
typedef T | ref_type |
Referenced type. | |
Constructors | |
typedef void(idref::* | bool_convertible) () |
Opaque type that can be evaluated as true or false. | |
idref (const C *s) | |
Initialize an instance with a copy of a C string. | |
idref (const C *s, std::size_t n) | |
Initialize an instance with a character array. | |
idref (std::size_t n, C c) | |
Initialize an instance with multiple copies of the same character. | |
idref (const std::basic_string< C > &s) | |
Initialize an instance with a copy of a standard string. | |
idref (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. | |
idref (const idref &x, flags f=0, container *c=0) | |
Copy constructor. | |
virtual idref * | _clone (flags f=0, container *c=0) const |
Copy the instance polymorphically. | |
template<typename S > | |
idref (istream< S > &s, flags f=0, container *c=0) | |
Create an instance from a data representation stream. | |
idref (const xercesc::DOMElement &e, flags f=0, container *c=0) | |
Create an instance from a DOM element. | |
idref (const xercesc::DOMAttr &a, flags f=0, container *c=0) | |
Create an instance from a DOM Attribute. | |
idref (const std::basic_string< C > &s, const xercesc::DOMElement *e, flags f=0, container *c=0) | |
Create an instance from a string fragment. | |
idref & | operator= (C c) |
Assign a character to the instance. | |
idref & | operator= (const C *s) |
Assign a C string to the instance. | |
idref & | operator= (const std::basic_string< C > &s) |
Assign a standard string to the instance. | |
idref & | operator= (const idref &x) |
Copy assignment operator. | |
const ref_type * | operator-> () const |
Call referenced object. | |
ref_type * | operator-> () |
Call referenced object. | |
const ref_type & | operator* () const |
Dereference referenced object. | |
ref_type & | operator* () |
Dereference referenced object. | |
const ref_type * | get () const |
Get a constant pointer to the referenced object. | |
ref_type * | get () |
Get a pointer to the referenced object. | |
operator bool_convertible () const | |
Implicit conversion to boolean type. | |
Class corresponding to the XML Schema IDREF built-in type.
The idref 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).
The idref class also provides an autopointer-like interface for resolving referenced objects. By default the object is returned as type (mapping for anyType) but statically-typed idref can be created using the XML Schema extension. See the C++/Tree Mapping User Manual for more information.
|
inline |
Initialize an instance with a copy of a C string.
s | A C string to copy. |
|
inline |
Initialize an instance with a character array.
s | A character array to copy. |
n | A number of character to copy. |
|
inline |
Initialize an instance with multiple copies of the same character.
n | A number of copies to create. |
c | A character to copy. |
|
inline |
Initialize an instance with a copy of a standard string.
s | A standard string to copy. |
|
inline |
Initialize an instance with a copy of a substring.
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. |
|
inline |
Copy constructor.
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.
idref | ( | istream< S > & | s, |
flags | f = 0 , |
||
container * | c = 0 |
||
) |
Create an instance from a data representation stream.
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. |
idref | ( | const xercesc::DOMElement & | e, |
flags | f = 0 , |
||
container * | c = 0 |
||
) |
Create an instance from a DOM element.
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. |
idref | ( | const xercesc::DOMAttr & | a, |
flags | f = 0 , |
||
container * | c = 0 |
||
) |
Create an instance from a DOM Attribute.
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. |
idref | ( | const std::basic_string< C > & | s, |
const xercesc::DOMElement * | e, | ||
flags | f = 0 , |
||
container * | c = 0 |
||
) |
Create an instance from a string fragment.
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. |
|
virtual |
Copy the instance polymorphically.
f | Flags to create the copy with. |
c | A pointer to the object that will contain the 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.
|
inline |
Assign a character to the instance.
The resulting idref has only one character.
c | A character to assign. |
|
inline |
Assign a C string to the instance.
The resulting idref contains a copy of the C string.
s | A C string to assign. |
|
inline |
Assign a standard string to the instance.
The resulting idref contains a copy of the standard string.
s | A standard string to assign. |
|
inline |
Copy assignment operator.
x | An instance to assign. |
|
inline |
Call referenced object.
References idref< C, B, T >::get().
|
inline |
Call referenced object.
References idref< C, B, T >::get().
|
inline |
Dereference referenced object.
References idref< C, B, T >::get().
|
inline |
Dereference referenced object.
References idref< C, B, T >::get().
|
inline |
Get a constant pointer to the referenced object.
Referenced by idref< C, B, T >::operator*(), idref< C, B, T >::operator*(), idref< C, B, T >::operator->(), and idref< C, B, T >::operator->().
|
inline |
Get a pointer to the referenced object.
|
inline |
Implicit conversion to boolean type.