te::xsd::Union Class Reference

It defines a simple type as a collection (union) of values from specified simple data types. More...

#include <Union.h>

Inheritance diagram for te::xsd::Union:
te::xsd::SimpleTypeConstructor te::xsd::Identifiable te::xsd::Annotated

Public Member Functions

void addMemberType (QName *name)
 It adds a member type to this Union element. More...
 
void addSimpleType (SimpleType *a)
 It adds an internal simple type element to this Union element. More...
 
SimpleTypeConstructorclone () const
 It creates a clone of the object. More...
 
AnnotationgetAnnotation () const
 It returns the associated annotation. More...
 
std::string * getId () const
 It returns a pointer (may be NULL) to the object id. More...
 
const boost::ptr_vector< QName > & getMemberTypes () const
 It returns the list of member types. More...
 
const boost::ptr_vector< SimpleType > & getSimpleTypes () const
 It returns the list of simple types defined on this union element. More...
 
Unionoperator= (const Union &rhs)
 Assignment operator. More...
 
void setAnnotation (Annotation *ann)
 It sets the associated annotation. More...
 
void setId (std::string *id)
 it sets the id. More...
 
 Union (Annotation *ann=0, std::string *id=0)
 Constructor. More...
 
 Union (const Union &rhs)
 Copy constructor. More...
 
 ~Union ()
 Destructor. More...
 

Private Attributes

boost::ptr_vector< SimpleTypem_internalSimpleTypeVec
 Used when the union has internal simple types. More...
 
boost::ptr_vector< QNamem_memberTypeVec
 It specifies a list of built-in data types or simpleType elements defined in a schema. (Optional) More...
 

Detailed Description

It defines a simple type as a collection (union) of values from specified simple data types.

Note
Parent elements: simpleType.

Definition at line 50 of file Union.h.

Constructor & Destructor Documentation

te::xsd::Union::Union ( Annotation ann = 0,
std::string *  id = 0 
)

Constructor.

Parameters
annAn annotation.
idIt specifies a unique ID for the element.
Note
The Union object will take the ownership of the given pointers.
te::xsd::Union::Union ( const Union rhs)

Copy constructor.

Parameters
rhsRight-hand-side object.
te::xsd::Union::~Union ( )

Destructor.

Member Function Documentation

void te::xsd::Union::addMemberType ( QName name)

It adds a member type to this Union element.

Parameters
nameThe name of a built-in data type or simpleType element defined in this or another schema.
Note
The Union object will take the ownership of the given pointer.
void te::xsd::Union::addSimpleType ( SimpleType a)

It adds an internal simple type element to this Union element.

Parameters
aThe simple type that will be added.
Note
The Union object will take the ownership of the given pointer.
SimpleTypeConstructor* te::xsd::Union::clone ( ) const
virtual

It creates a clone of the object.

Returns
A clone of the object. The caller will take the ownership of the returned pointer.

Implements te::xsd::SimpleTypeConstructor.

Annotation* te::xsd::Annotated::getAnnotation ( ) const
inherited

It returns the associated annotation.

Returns
The associated annotation.
std::string* te::xsd::Identifiable::getId ( ) const
inherited

It returns a pointer (may be NULL) to the object id.

const boost::ptr_vector<QName>& te::xsd::Union::getMemberTypes ( ) const

It returns the list of member types.

Returns
The list list of member types.
const boost::ptr_vector<SimpleType>& te::xsd::Union::getSimpleTypes ( ) const

It returns the list of simple types defined on this union element.

Returns
The the list of simple types defined on this union element.
Union& te::xsd::Union::operator= ( const Union rhs)

Assignment operator.

Parameters
rhsRight-hand-side object.
Returns
A reference to this object.
void te::xsd::Annotated::setAnnotation ( Annotation ann)
inherited

It sets the associated annotation.

Parameters
annThe annotation to be associated to the object. The annotated class will take the ownership of the given pointer.
void te::xsd::Identifiable::setId ( std::string *  id)
inherited

it sets the id.

Parameters
idThe id to be associated to the object. It will take the ownership of the given string.

Member Data Documentation

boost::ptr_vector<SimpleType> te::xsd::Union::m_internalSimpleTypeVec
private

Used when the union has internal simple types.

Definition at line 120 of file Union.h.

boost::ptr_vector<QName> te::xsd::Union::m_memberTypeVec
private

It specifies a list of built-in data types or simpleType elements defined in a schema. (Optional)

Definition at line 119 of file Union.h.


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