te::xsd::Group Class Reference

This class models a group element in a XML Schema. More...

#include <Group.h>

Inheritance diagram for te::xsd::Group:
te::xsd::Content te::xsd::Occurs te::xsd::Identifiable te::xsd::Annotated

Public Member Functions

Contentclone () const
 
AnnotationgetAnnotation () const
 It returns the associated annotation. More...
 
ContentgetContent () const
 It returns the content of this group. More...
 
std::string * getId () const
 It returns a pointer (may be NULL) to the object id. More...
 
const unsigned int getMaxOccurs () const
 It returns the maxOccurs values. More...
 
const unsigned int getMinOccurs () const
 It returns the minOccurs values. More...
 
std::string * getName () const
 It returns the name of the group. More...
 
QNamegetRef () const
 It returns the reference to a name of another group. More...
 
 Group (unsigned int minOccurs=1, unsigned int maxOccurs=1, Annotation *ann=0, std::string *id=0)
 Constructor. More...
 
 Group (const Group &rhs)
 Copy constructor. More...
 
Groupoperator= (const Group &rhs)
 Assignment operator. More...
 
void setAnnotation (Annotation *ann)
 It sets the associated annotation. More...
 
void setContent (Content *c)
 It sets the group content. It can be one of: all | choice | sequence. More...
 
void setId (std::string *id)
 it sets the id. More...
 
void setMaxOccurs (unsigned int maxOccurs)
 It sets the maxOccurs value. More...
 
void setMinOccurs (unsigned int minOccurs)
 It sets the minOccurs value. More...
 
void setName (std::string *name)
 It sets a name for the group. More...
 
void setRef (QName *ref)
 It sets a reference to a name of another group. More...
 
 ~Group ()
 Destructor. More...
 

Static Public Attributes

static const unsigned int unbounded
 Identifer for "unbounded" max values. More...
 

Protected Attributes

unsigned int m_maxOccurs
 It specifies the maximum number of times the any element can occur in the parent element. The value can be any number >= 0, or if you want to set no limit on the maximum number, use the value "unbounded". Default value is 1. (Optional) More...
 
unsigned int m_minOccurs
 It specifies the minimum number of times the any element can occur in the parent element. The value can be any number >= 0. Default value is 1. (Optional) More...
 

Private Attributes

Contentm_content
 It can be one of: all | choice | sequence. (Optional) More...
 
std::string * m_name
 It specifies a name for the group. (Optional) More...
 
QNamem_ref
 It refers to the name of another group. Name and ref attributes cannot both be present. More...
 

Detailed Description

This class models a group element in a XML Schema.

The group element is used to define a group of elements to be used in complex type definitions.

Note
Parent elements: schema, choice, sequence, complexType, restriction (both simpleContent and complexContent), extension (both simpleContent and complexContent).

Definition at line 52 of file Group.h.

Constructor & Destructor Documentation

te::xsd::Group::Group ( unsigned int  minOccurs = 1,
unsigned int  maxOccurs = 1,
Annotation ann = 0,
std::string *  id = 0 
)

Constructor.

Parameters
idIt specifies a unique ID for the element. It can be a NULL value.
minOccursThe minimum number of times the element can occur.
maxOccursThe maximum number of times the element can occur.
te::xsd::Group::Group ( const Group rhs)

Copy constructor.

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

Destructor.

Member Function Documentation

Content* te::xsd::Group::clone ( ) const
virtual

Implements te::xsd::Content.

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

It returns the associated annotation.

Returns
The associated annotation.
Content* te::xsd::Group::getContent ( ) const

It returns the content of this group.

Returns
The content of this group.
std::string* te::xsd::Identifiable::getId ( ) const
inherited

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

const unsigned int te::xsd::Occurs::getMaxOccurs ( ) const
inherited

It returns the maxOccurs values.

Returns
The maxOccurs value.
const unsigned int te::xsd::Occurs::getMinOccurs ( ) const
inherited

It returns the minOccurs values.

Returns
The minOccurs value.
std::string* te::xsd::Group::getName ( ) const

It returns the name of the group.

Returns
The name of the group.
QName* te::xsd::Group::getRef ( ) const

It returns the reference to a name of another group.

Returns
The reference to a name of another group.
Group& te::xsd::Group::operator= ( const Group 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::Group::setContent ( Content c)

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

Parameters
cThe appropriate content to group.
Note
The Group object 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.
void te::xsd::Occurs::setMaxOccurs ( unsigned int  maxOccurs)
inherited

It sets the maxOccurs value.

Parameters
maxOccursThe maxOccurs value. The value can be any number >= 0.
Note
If you want to set no limit on the maximum number, use the value "unbounded" defined as te::xsd::Occurs::unbounded.
void te::xsd::Occurs::setMinOccurs ( unsigned int  minOccurs)
inherited

It sets the minOccurs value.

Parameters
minOccursThe minOccurs value. The value can be any number >= 0.
void te::xsd::Group::setName ( std::string *  name)

It sets a name for the group.

Parameters
nameThe group name.
Note
Setting a name will turn to NULL the reference property.
The Group object will take the ownership of the given pointer.
void te::xsd::Group::setRef ( QName ref)

It sets a reference to a name of another group.

Parameters
refA reference to a name of another group.
Note
Setting a reference property will turn to NULL the name.
The Group object will take the ownership of the given pointer.

Member Data Documentation

Content* te::xsd::Group::m_content
private

It can be one of: all | choice | sequence. (Optional)

Definition at line 144 of file Group.h.

unsigned int te::xsd::Occurs::m_maxOccurs
protectedinherited

It specifies the maximum number of times the any element can occur in the parent element. The value can be any number >= 0, or if you want to set no limit on the maximum number, use the value "unbounded". Default value is 1. (Optional)

Definition at line 113 of file Occurs.h.

unsigned int te::xsd::Occurs::m_minOccurs
protectedinherited

It specifies the minimum number of times the any element can occur in the parent element. The value can be any number >= 0. Default value is 1. (Optional)

Definition at line 112 of file Occurs.h.

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

It specifies a name for the group. (Optional)

Definition at line 142 of file Group.h.

QName* te::xsd::Group::m_ref
private

It refers to the name of another group. Name and ref attributes cannot both be present.

Definition at line 143 of file Group.h.

const unsigned int te::xsd::Occurs::unbounded
staticinherited

Identifer for "unbounded" max values.

Definition at line 108 of file Occurs.h.


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