All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
te::xsd::AttributeGroup Class Reference

#include <AttributeGroup.h>

Inheritance diagram for te::xsd::AttributeGroup:
te::xsd::AbstractAttribute te::xsd::Identifiable te::xsd::Annotated

Public Member Functions

void addAttribute (AbstractAttribute *a)
 It adds an attrbitue to this attribute group element. More...
 
 AttributeGroup (Annotation *ann=0, std::string *id=0)
 Constructor. More...
 
 AttributeGroup (const AttributeGroup &rhs)
 Copy constructor. More...
 
AbstractAttributeclone () const
 
AnnotationgetAnnotation () const
 It returns the associated annotation. More...
 
AnyAttributegetAnyAttribute () const
 It returns the anyAttribute defined on this attribute group element. More...
 
std::string * getId () const
 It returns a pointer (may be NULL) to the object id. More...
 
std::string * getName () const
 It returns the name of the attribute group. More...
 
QNamegetRef () const
 It returns the reference to a named attribute element. More...
 
AttributeGroupoperator= (const AttributeGroup &rhs)
 Assignment operator. More...
 
void setAnnotation (Annotation *ann)
 It sets the associated annotation. More...
 
void setAnyAttribute (AnyAttribute *a)
 It sets the anyAttribute to this attribute group element. More...
 
void setId (std::string *id)
 it sets the id. More...
 
void setName (std::string *name)
 It sets a name for the attribute group. More...
 
void setRef (QName *ref)
 It sets a reference to a named attribute. More...
 
 ~AttributeGroup ()
 Destructor. More...
 

Private Attributes

AnyAttributem_anyAttr
 It enables the author to extend the XML document with attributes not specified by the schema. (Optional) More...
 
boost::ptr_vector
< AbstractAttribute
m_attributeVec
 The list of attributes, references or nested attribute groups. (Optional) More...
 
std::string * m_name
 It specifies a name for the attribute group. (Optional) More...
 
QNamem_ref
 It specifies a reference to a named attribute group. Name and ref attributes cannot both be present. (Optional) More...
 

Detailed Description

Definition at line 55 of file AttributeGroup.h.

Constructor & Destructor Documentation

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

Constructor.

Parameters
annAn annotation.
idIt specifies a unique ID for the element.
Note
The AttributeGroup object will take the ownership of the annotation and id.

Definition at line 31 of file AttributeGroup.cpp.

te::xsd::AttributeGroup::AttributeGroup ( const AttributeGroup rhs)

Copy constructor.

Parameters
rhsRight-hand-side object.

Definition at line 40 of file AttributeGroup.cpp.

References m_anyAttr, m_attributeVec, m_name, and m_ref.

te::xsd::AttributeGroup::~AttributeGroup ( )

Destructor.

Definition at line 56 of file AttributeGroup.cpp.

Member Function Documentation

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

It adds an attrbitue to this attribute group element.

Parameters
aThe attribute that will be added.
Note
The AttributeGroup object will take the ownership of the given pointer.

Definition at line 123 of file AttributeGroup.cpp.

te::xsd::AbstractAttribute * te::xsd::AttributeGroup::clone ( ) const
virtual

Implements te::xsd::AbstractAttribute.

Definition at line 134 of file AttributeGroup.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.

te::xsd::AnyAttribute * te::xsd::AttributeGroup::getAnyAttribute ( ) const

It returns the anyAttribute defined on this attribute group element.

Returns
The anyAttribute.

Definition at line 100 of file AttributeGroup.cpp.

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.

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

It returns the name of the attribute group.

Returns
The name of the attribute group.

Definition at line 90 of file AttributeGroup.cpp.

te::xsd::QName * te::xsd::AttributeGroup::getRef ( ) const

It returns the reference to a named attribute element.

Returns
The reference to a named attribute element.

Definition at line 95 of file AttributeGroup.cpp.

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

Assignment operator.

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

Definition at line 63 of file AttributeGroup.cpp.

References m_anyAttr, m_attributeVec, m_name, m_ref, te::xsd::Identifiable::operator=(), and te::xsd::Annotated::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::AttributeGroup::setAnyAttribute ( AnyAttribute a)

It sets the anyAttribute to this attribute group element.

Parameters
aIt specifies the anyAttribute.
Note
The AttributeGroup object will take the ownership of the given pointer.

Definition at line 128 of file AttributeGroup.cpp.

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().

void te::xsd::AttributeGroup::setName ( std::string *  name)

It sets a name for the attribute group.

Parameters
nameThe attribute group name.
Note
Setting a name will turn to NULL the reference property.
The AttributeGroup object will take the ownership of the given pointer.

Definition at line 105 of file AttributeGroup.cpp.

void te::xsd::AttributeGroup::setRef ( QName ref)

It sets a reference to a named attribute.

Parameters
refA reference to a named attribute.
Note
Setting a reference property will turn to NULL the name.
The AttributeGroup object will take the ownership of the given pointer.

Definition at line 114 of file AttributeGroup.cpp.

Member Data Documentation

AnyAttribute* te::xsd::AttributeGroup::m_anyAttr
private

It enables the author to extend the XML document with attributes not specified by the schema. (Optional)

Definition at line 154 of file AttributeGroup.h.

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

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

The list of attributes, references or nested attribute groups. (Optional)

Definition at line 153 of file AttributeGroup.h.

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

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

It specifies a name for the attribute group. (Optional)

Definition at line 151 of file AttributeGroup.h.

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

QName* te::xsd::AttributeGroup::m_ref
private

It specifies a reference to a named attribute group. Name and ref attributes cannot both be present. (Optional)

Definition at line 152 of file AttributeGroup.h.

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


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