te::xsd::ComplexType Class Reference

It models a XML Schema Complex Type definition. More...

#include <ComplexType.h>

Inheritance diagram for te::xsd::ComplexType:
te::xsd::Type te::xsd::Identifiable te::xsd::Annotated

Public Member Functions

void addAttribute (AbstractAttribute *a)
 It adds an attribute to this ComplexType. More...
 
Typeclone () const
 
 ComplexType (Annotation *ann=0, std::string *id=0)
 Constructor. More...
 
 ComplexType (const ComplexType &rhs)
 Copy constructor. More...
 
AnnotationgetAnnotation () const
 It returns the associated annotation. More...
 
AnyAttributegetAnyAttribute () const
 It returns the anyAttribute defined on this ComplexType. More...
 
const boost::ptr_vector< AbstractAttribute > & getAttributes () const
 It returns the list of attributes of this ComplexType. More...
 
int getBlock ()
 It returns the block value for the CompleType. More...
 
ComplexContentgetComplexContent () const
 It returns the ComplexContent of this ComplexType. More...
 
ContentgetContent ()
 It returns the content element of this ComplexType. More...
 
int getFinal ()
 It returns the final value for the CompleType. More...
 
std::string * getId () const
 It returns a pointer (may be NULL) to the object id. More...
 
std::string * getName () const
 It returns the element name or NULL if it doesn't have one. More...
 
SimpleContentgetSimpleContent () const
 It returns the SimpleContent of this ComplexType. More...
 
bool isAbstract ()
 If the CompleType is "abstract" or not. More...
 
bool isMixed ()
 If the CompleType is "mixed" or not. More...
 
ComplexTypeoperator= (const ComplexType &rhs)
 Assignment operator. More...
 
void setAnnotation (Annotation *ann)
 It sets the associated annotation. More...
 
void setAnyAttribute (AnyAttribute *a)
 It sets the anyAttribute to this ComplexType. More...
 
void setAsAbstract (bool v)
 It specifies whether the element can be used in an instance of the document. More...
 
void setAsMixed (bool v)
 It specifies whether character data is allowed to appear between the child elements of this complexType element. More...
 
void setBlock (int v)
 It prevents an element with a specified type of derivation from being used in place of this element. More...
 
void setComplexContent (ComplexContent *cc)
 It sets the ComplexContent to this ComplexType. More...
 
void setContent (Content *c)
 It sets the ComplexType content. It can be one of: group | all | choice | sequence. More...
 
void setFinal (int v)
 It sets the default value of the final attribute on the element element. More...
 
void setId (std::string *id)
 it sets the id. More...
 
void setName (std::string *name)
 It sets the element name. More...
 
void setSimpleContent (SimpleContent *sc)
 It sets the SimpleContent to this ComplexType. More...
 
 ~ComplexType ()
 Destructor. More...
 

Private Attributes

bool m_abstract
 It specifies whether the complex type can be used in an instance document (optional). True indicates that an element cannot use this complex type directly but must use a complex type derived from this complex type. Default is false. More...
 
AnyAttributem_anyAttr
 A pointer to a anyAttribute. If m_sContent or m_cContent is present, this must be NULL. More...
 
boost::ptr_vector< AbstractAttributem_attributeVec
 It can be: (attribute|attributeGroup)*. If m_sContent or m_cContent is present, this must be NULL. More...
 
int m_block
 It prevents an element with a specified type of derivation from being used in place of this element. (Optional) More...
 
ComplexContentm_cContent
 ComplexContent. If m_sContent is present this must be NULL. Likewise if m_content or m_attributes or m_anyAttr is present this must be also NULL. More...
 
Contentm_content
 It can be: group|all|choice|sequence. If m_sContent or m_cContent is present, this must be NULL. More...
 
int m_final
 It sets the default value of the final attribute on the element element. This attribute cannot be used if the parent element is not the schema element. (Optional) More...
 
bool m_mixed
 It specifies whether character data is allowed to appear between the child elements of this complexType element (optional). Default is false. If a simpleContent element is a child element, the mixed attribute is not allowed. More...
 
std::string * m_name
 The type name if it is not an unonoymous type (declared inside a element definition). More...
 
SimpleContentm_sContent
 SimpleContent. If m_cContent is present this must be NULL. Likewise if m_content or m_attributes or m_anyAttr is present this must be also NULL. More...
 

Detailed Description

It models a XML Schema Complex Type definition.

Note
Parent elements: element, redefine, schema

Definition at line 56 of file ComplexType.h.

Constructor & Destructor Documentation

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

Constructor.

Parameters
idIt specifies a unique ID for the element. It can be a NULL value.
te::xsd::ComplexType::ComplexType ( const ComplexType rhs)

Copy constructor.

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

Destructor.

Member Function Documentation

void te::xsd::ComplexType::addAttribute ( AbstractAttribute a)

It adds an attribute to this ComplexType.

Parameters
aThe attribute that will be added. It can be: attribute | attributeGroup.
Note
Adding a attribute will turn to NULL the SimpleContent and the ComplexContent.
The ComplexType object will take the ownership of the given pointer.
Type* te::xsd::ComplexType::clone ( ) const
virtual

Implements te::xsd::Type.

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

It returns the associated annotation.

Returns
The associated annotation.
AnyAttribute* te::xsd::ComplexType::getAnyAttribute ( ) const

It returns the anyAttribute defined on this ComplexType.

Returns
The anyAttribute defined on this ComplexType.
const boost::ptr_vector<AbstractAttribute>& te::xsd::ComplexType::getAttributes ( ) const

It returns the list of attributes of this ComplexType.

Returns
The list of attributes of this ComplexType.
int te::xsd::ComplexType::getBlock ( )

It returns the block value for the CompleType.

Returns
The block value. It can be: #all | list of (extension|restriction).
ComplexContent* te::xsd::ComplexType::getComplexContent ( ) const

It returns the ComplexContent of this ComplexType.

Returns
The ComplexContent of this ComplexType.
Content* te::xsd::ComplexType::getContent ( )

It returns the content element of this ComplexType.

Returns
The content element of this ComplexType. It can be: group | all | choice | sequence.
int te::xsd::ComplexType::getFinal ( )

It returns the final value for the CompleType.

Returns
The final value. It can be: #all | list of (extension|restriction).
std::string* te::xsd::Identifiable::getId ( ) const
inherited

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

std::string* te::xsd::ComplexType::getName ( ) const

It returns the element name or NULL if it doesn't have one.

Returns
The element name or NULL if it doesn't have one.
SimpleContent* te::xsd::ComplexType::getSimpleContent ( ) const

It returns the SimpleContent of this ComplexType.

Returns
The SimpleContent of this ComplexType.
bool te::xsd::ComplexType::isAbstract ( )

If the CompleType is "abstract" or not.

Returns
True if the CompleType is "abstract" and false if not.
bool te::xsd::ComplexType::isMixed ( )

If the CompleType is "mixed" or not.

Returns
True if the CompleType is "mixed" and false if not.
ComplexType& te::xsd::ComplexType::operator= ( const ComplexType 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::ComplexType::setAnyAttribute ( AnyAttribute a)

It sets the anyAttribute to this ComplexType.

Parameters
aIt specifies the anyAttribute.
Note
Setting the anyAttribute will turn to NULL the SimpleContent and the ComplexContent.
The ComplexType object will take the ownership of the given pointer.
void te::xsd::ComplexType::setAsAbstract ( bool  v)

It specifies whether the element can be used in an instance of the document.

Parameters
vTrue indicates that the element cannot appear in the instance document. Instead, another element whose substitutionGroup attribute contains the qualified name (QName) of this element must appear in this element's place.
void te::xsd::ComplexType::setAsMixed ( bool  v)

It specifies whether character data is allowed to appear between the child elements of this complexType element.

Parameters
vTrue indicates that character data is allowed to appear between the child elements of this complexType element.
void te::xsd::ComplexType::setBlock ( int  v)

It prevents an element with a specified type of derivation from being used in place of this element.

Parameters
vIt can be: #all|list of (extension|restriction).
void te::xsd::ComplexType::setComplexContent ( ComplexContent cc)

It sets the ComplexContent to this ComplexType.

Parameters
ccThe ComplexContent to this ComplexType.
Note
Setting the ComplexContent element will turn to NULL the SimpleContent, Content, Attributes and AnyAttribute.
The ComplexType object will take the ownership of the given pointer.
void te::xsd::ComplexType::setContent ( Content c)

It sets the ComplexType content. It can be one of: group | all | choice | sequence.

Parameters
cThe content to this ComplexType.
Note
Setting the content element will turn to NULL the SimpleContent and the ComplexContent.
The ComplexType object will take the ownership of the given pointer.
void te::xsd::ComplexType::setFinal ( int  v)

It sets the default value of the final attribute on the element element.

Parameters
vIt can be: #all|list of (extension|restriction).
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.
void te::xsd::ComplexType::setName ( std::string *  name)

It sets the element name.

Parameters
nameThe element name.
Note
The ComplexType object will take the ownership of the given name.
void te::xsd::ComplexType::setSimpleContent ( SimpleContent sc)

It sets the SimpleContent to this ComplexType.

Parameters
scThe SimpleContent to this ComplexType.
Note
Setting the SimpleContent element will turn to NULL the ComplexContent, Content, Attributes and AnyAttribute.
The ComplexType object will take the ownership of the given pointer.

Member Data Documentation

bool te::xsd::ComplexType::m_abstract
private

It specifies whether the complex type can be used in an instance document (optional). True indicates that an element cannot use this complex type directly but must use a complex type derived from this complex type. Default is false.

Definition at line 252 of file ComplexType.h.

AnyAttribute* te::xsd::ComplexType::m_anyAttr
private

A pointer to a anyAttribute. If m_sContent or m_cContent is present, this must be NULL.

Definition at line 260 of file ComplexType.h.

boost::ptr_vector<AbstractAttribute> te::xsd::ComplexType::m_attributeVec
private

It can be: (attribute|attributeGroup)*. If m_sContent or m_cContent is present, this must be NULL.

Definition at line 259 of file ComplexType.h.

int te::xsd::ComplexType::m_block
private

It prevents an element with a specified type of derivation from being used in place of this element. (Optional)

Definition at line 254 of file ComplexType.h.

ComplexContent* te::xsd::ComplexType::m_cContent
private

ComplexContent. If m_sContent is present this must be NULL. Likewise if m_content or m_attributes or m_anyAttr is present this must be also NULL.

Definition at line 257 of file ComplexType.h.

Content* te::xsd::ComplexType::m_content
private

It can be: group|all|choice|sequence. If m_sContent or m_cContent is present, this must be NULL.

Definition at line 258 of file ComplexType.h.

int te::xsd::ComplexType::m_final
private

It sets the default value of the final attribute on the element element. This attribute cannot be used if the parent element is not the schema element. (Optional)

Definition at line 255 of file ComplexType.h.

bool te::xsd::ComplexType::m_mixed
private

It specifies whether character data is allowed to appear between the child elements of this complexType element (optional). Default is false. If a simpleContent element is a child element, the mixed attribute is not allowed.

Definition at line 253 of file ComplexType.h.

std::string* te::xsd::ComplexType::m_name
private

The type name if it is not an unonoymous type (declared inside a element definition).

Definition at line 251 of file ComplexType.h.

SimpleContent* te::xsd::ComplexType::m_sContent
private

SimpleContent. If m_cContent is present this must be NULL. Likewise if m_content or m_attributes or m_anyAttr is present this must be also NULL.

Definition at line 256 of file ComplexType.h.


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