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

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

#include <elements.hxx>

Inheritance diagram for simple_type< C, B >:

Constructors

 simple_type ()
 Default constructor.
 
 simple_type (const C *s)
 Create an instance from a C string.
 
 simple_type (const std::basic_string< C > &s)
 Create an instance from a string.
 
 simple_type (const simple_type &x, flags f=0, container *c=0)
 Copy constructor.
 
virtual simple_type_clone (flags f=0, container *c=0) const
 Copy the instance polymorphically.
 
template<typename S >
 simple_type (istream< S > &s, flags f=flags::extract_content, container *c=0)
 Create an instance from a data representation stream.
 
 simple_type (const xercesc::DOMElement &e, flags f=flags::extract_content, container *c=0)
 Create an instance from a DOM element.
 
 simple_type (const xercesc::DOMAttr &a, flags f=flags::extract_content, container *c=0)
 Create an instance from a DOM Attribute.
 
 simple_type (const std::basic_string< C > &s, const xercesc::DOMElement *e, flags f=flags::extract_content, container *c=0)
 Create an instance from a string fragment.
 
const std::basic_string< C > & text_content () const
 Return a read-only (constant) reference to the anySimpleType text content.
 
std::basic_string< C > & text_content ()
 Return a read-write reference to the anySimpleType text content.
 
void text_content (const std::basic_string< C > &t)
 Set the anySimpleType text content.
 

Detailed Description

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

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

Constructor & Destructor Documentation

◆ simple_type() [1/7]

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

Create an instance from a C string.

Parameters
sA string to initialize the instance with.

◆ simple_type() [2/7]

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

Create an instance from a string.

Parameters
sA string to initialize the instance with.

◆ simple_type() [3/7]

template<typename C , typename B >
simple_type ( const simple_type< C, B > &  x,
flags  f = 0,
container c = 0 
)

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.

◆ simple_type() [4/7]

template<typename C , typename B >
template<typename S >
simple_type ( istream< S > &  s,
flags  f = flags::extract_content,
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.

◆ simple_type() [5/7]

template<typename C , typename B >
simple_type ( const xercesc::DOMElement &  e,
flags  f = flags::extract_content,
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.

◆ simple_type() [6/7]

template<typename C , typename B >
simple_type ( const xercesc::DOMAttr &  a,
flags  f = flags::extract_content,
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.

◆ simple_type() [7/7]

template<typename C , typename B >
simple_type ( const std::basic_string< C > &  s,
const xercesc::DOMElement *  e,
flags  f = flags::extract_content,
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 simple_type * _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.

◆ text_content() [1/3]

template<typename C , typename B >
const std::basic_string< C > & text_content ( ) const

Return a read-only (constant) reference to the anySimpleType text content.

Returns
A constant reference to the text string.

◆ text_content() [2/3]

template<typename C , typename B >
std::basic_string< C > & text_content ( )

Return a read-write reference to the anySimpleType text content.

Returns
A reference to the text string.

◆ text_content() [3/3]

template<typename C , typename B >
void text_content ( const std::basic_string< C > &  t)

Set the anySimpleType text content.

Parameters
tA new text string to set.

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

Copyright © 2005-2023 Code Synthesis.