All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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.

Definition at line 35 of file Union.cpp.

te::xsd::Union::Union ( const Union rhs)

Copy constructor.

Parameters
rhsRight-hand-side object.

Definition at line 40 of file Union.cpp.

References m_internalSimpleTypeVec, and m_memberTypeVec.

te::xsd::Union::~Union ( )

Destructor.

Definition at line 50 of file Union.cpp.

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.

Definition at line 80 of file Union.cpp.

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.

Definition at line 85 of file Union.cpp.

te::xsd::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.

Definition at line 90 of file Union.cpp.

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

It returns the associated annotation.

Returns
The associated annotation.

Definition at line 30 of file Annotated.cpp.

References te::xsd::Annotated::m_annotation.

std::string * te::xsd::Identifiable::getId ( ) const
inherited

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

Definition at line 35 of file Identifiable.cpp.

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

It returns the list of member types.

Returns
The list list of member types.

Definition at line 70 of file Union.cpp.

const boost::ptr_vector< te::xsd::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.

Definition at line 75 of file Union.cpp.

te::xsd::Union & te::xsd::Union::operator= ( const Union rhs)

Assignment operator.

Parameters
rhsRight-hand-side object.
Returns
A reference to this object.

Definition at line 54 of file Union.cpp.

References m_internalSimpleTypeVec, m_memberTypeVec, and te::xsd::SimpleTypeConstructor::operator=().

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.

Definition at line 35 of file Annotated.cpp.

Referenced by te::xsd::serialize::ReadAnnotated().

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.

Definition at line 29 of file Identifiable.cpp.

References te::xsd::Identifiable::m_id.

Referenced by te::xsd::serialize::ReadIdentifiable().

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.

Referenced by operator=(), and Union().

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.

Referenced by operator=(), and Union().


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