It models a XML Schema Complex Type definition. More...
#include <ComplexType.h>
Public Member Functions | |
void | addAttribute (AbstractAttribute *a) |
It adds an attribute to this ComplexType. More... | |
Type * | clone () const |
ComplexType (Annotation *ann=0, std::string *id=0) | |
Constructor. More... | |
ComplexType (const ComplexType &rhs) | |
Copy constructor. More... | |
Annotation * | getAnnotation () const |
It returns the associated annotation. More... | |
AnyAttribute * | getAnyAttribute () 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... | |
ComplexContent * | getComplexContent () const |
It returns the ComplexContent of this ComplexType. More... | |
Content * | getContent () |
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... | |
SimpleContent * | getSimpleContent () 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... | |
ComplexType & | operator= (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... | |
AnyAttribute * | m_anyAttr |
A pointer to a anyAttribute. If m_sContent or m_cContent is present, this must be NULL. More... | |
boost::ptr_vector < AbstractAttribute > | m_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... | |
ComplexContent * | m_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... | |
Content * | m_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... | |
SimpleContent * | m_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... | |
It models a XML Schema Complex Type definition.
Definition at line 56 of file ComplexType.h.
te::xsd::ComplexType::ComplexType | ( | Annotation * | ann = 0 , |
std::string * | id = 0 |
||
) |
Constructor.
id | It specifies a unique ID for the element. It can be a NULL value. |
Definition at line 34 of file ComplexType.cpp.
te::xsd::ComplexType::ComplexType | ( | const ComplexType & | rhs | ) |
Copy constructor.
rhs | Right-hand-side object. |
Definition at line 49 of file ComplexType.cpp.
te::xsd::ComplexType::~ComplexType | ( | ) |
Destructor.
Definition at line 64 of file ComplexType.cpp.
void te::xsd::ComplexType::addAttribute | ( | AbstractAttribute * | a | ) |
It adds an attribute to this ComplexType.
a | The attribute that will be added. It can be: attribute | attributeGroup. |
Definition at line 203 of file ComplexType.cpp.
|
virtual |
Implements te::xsd::Type.
Definition at line 228 of file ComplexType.cpp.
|
inherited |
It returns the associated annotation.
Definition at line 30 of file Annotated.cpp.
References te::xsd::Annotated::m_annotation.
te::xsd::AnyAttribute * te::xsd::ComplexType::getAnyAttribute | ( | ) | const |
It returns the anyAttribute defined on this ComplexType.
Definition at line 123 of file ComplexType.cpp.
const boost::ptr_vector< te::xsd::AbstractAttribute > & te::xsd::ComplexType::getAttributes | ( | ) | const |
It returns the list of attributes of this ComplexType.
Definition at line 118 of file ComplexType.cpp.
int te::xsd::ComplexType::getBlock | ( | ) |
It returns the block value for the CompleType.
Definition at line 93 of file ComplexType.cpp.
te::xsd::ComplexContent * te::xsd::ComplexType::getComplexContent | ( | ) | const |
It returns the ComplexContent of this ComplexType.
Definition at line 108 of file ComplexType.cpp.
te::xsd::Content * te::xsd::ComplexType::getContent | ( | ) |
It returns the content element of this ComplexType.
Definition at line 113 of file ComplexType.cpp.
int te::xsd::ComplexType::getFinal | ( | ) |
It returns the final value for the CompleType.
Definition at line 98 of file ComplexType.cpp.
|
inherited |
It returns a pointer (may be NULL) to the object id.
Definition at line 35 of file Identifiable.cpp.
std::string * te::xsd::ComplexType::getName | ( | ) | const |
It returns the element name or NULL if it doesn't have one.
Definition at line 78 of file ComplexType.cpp.
te::xsd::SimpleContent * te::xsd::ComplexType::getSimpleContent | ( | ) | const |
It returns the SimpleContent of this ComplexType.
Definition at line 103 of file ComplexType.cpp.
bool te::xsd::ComplexType::isAbstract | ( | ) |
If the CompleType is "abstract" or not.
Definition at line 83 of file ComplexType.cpp.
bool te::xsd::ComplexType::isMixed | ( | ) |
If the CompleType is "mixed" or not.
Definition at line 88 of file ComplexType.cpp.
te::xsd::ComplexType & te::xsd::ComplexType::operator= | ( | const ComplexType & | rhs | ) |
Assignment operator.
rhs | Right-hand-side object. |
Definition at line 73 of file ComplexType.cpp.
|
inherited |
It sets the associated annotation.
ann | The 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::ComplexType::setAnyAttribute | ( | AnyAttribute * | a | ) |
It sets the anyAttribute to this ComplexType.
a | It specifies the anyAttribute. |
Definition at line 215 of file ComplexType.cpp.
void te::xsd::ComplexType::setAsAbstract | ( | bool | v | ) |
It specifies whether the element can be used in an instance of the document.
v | True 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. |
Definition at line 134 of file ComplexType.cpp.
void te::xsd::ComplexType::setAsMixed | ( | bool | v | ) |
It specifies whether character data is allowed to appear between the child elements of this complexType element.
v | True indicates that character data is allowed to appear between the child elements of this complexType element. |
Definition at line 139 of file ComplexType.cpp.
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.
v | It can be: #all|list of (extension|restriction). |
Definition at line 144 of file ComplexType.cpp.
void te::xsd::ComplexType::setComplexContent | ( | ComplexContent * | cc | ) |
It sets the ComplexContent to this ComplexType.
cc | The ComplexContent to this ComplexType. |
Definition at line 172 of file ComplexType.cpp.
void te::xsd::ComplexType::setContent | ( | Content * | c | ) |
It sets the ComplexType content. It can be one of: group | all | choice | sequence.
c | The content to this ComplexType. |
Definition at line 190 of file ComplexType.cpp.
void te::xsd::ComplexType::setFinal | ( | int | v | ) |
It sets the default value of the final attribute on the element element.
v | It can be: #all|list of (extension|restriction). |
Definition at line 149 of file ComplexType.cpp.
|
inherited |
it sets the id.
id | The 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().
void te::xsd::ComplexType::setName | ( | std::string * | name | ) |
It sets the element name.
name | The element name. |
Definition at line 128 of file ComplexType.cpp.
void te::xsd::ComplexType::setSimpleContent | ( | SimpleContent * | sc | ) |
It sets the SimpleContent to this ComplexType.
sc | The SimpleContent to this ComplexType. |
Definition at line 154 of file ComplexType.cpp.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
private |
The type name if it is not an unonoymous type (declared inside a element definition).
Definition at line 251 of file ComplexType.h.
|
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.