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

This class models an XML Schema all element. More...

#include <All.h>

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

Public Member Functions

void addElement (Element *e)
 It adds an element to this All element. More...
 
 All (unsigned int minOccurs=1, unsigned int maxOccurs=1, Annotation *ann=0, std::string *id=0)
 Constructor. More...
 
 All (const All &rhs)
 Copy constructor. More...
 
Contentclone () const
 
AnnotationgetAnnotation () const
 It returns the associated annotation. More...
 
const boost::ptr_vector
< Element > & 
getElements () const
 It returns the list of elements of All. 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...
 
Alloperator= (const All &rhs)
 Assignment operator. More...
 
void setAnnotation (Annotation *ann)
 It sets the associated annotation. 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...
 
 ~All ()
 Destructor. More...
 

Static Public Attributes

static const unsigned int unbounded = std::numeric_limits<unsigned int>::max()
 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

boost::ptr_vector< Elementm_elementVec
 Lis of elements. (Optional) More...
 

Detailed Description

This class models an XML Schema all element.

The all element specifies that the child elements can appear in any order and that each child element can occur zero or one time.

Note
Parent elements: group, complexType, restriction (both simpleContent and complexContent), extension (both simpleContent and complexContent).

Definition at line 54 of file All.h.

Constructor & Destructor Documentation

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

Definition at line 34 of file All.cpp.

te::xsd::All::All ( const All rhs)

Copy constructor.

Parameters
rhsRight-hand-side object.

Definition at line 41 of file All.cpp.

References m_elementVec.

te::xsd::All::~All ( )

Destructor.

Definition at line 50 of file All.cpp.

Member Function Documentation

void te::xsd::All::addElement ( Element e)

It adds an element to this All element.

Parameters
eThe element that will be added.
Note
The All object will take the ownership of the given pointer.

Definition at line 76 of file All.cpp.

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

Implements te::xsd::Content.

Definition at line 81 of file All.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.

const boost::ptr_vector< te::xsd::Element > & te::xsd::All::getElements ( ) const

It returns the list of elements of All.

Returns
The list of elements.

Definition at line 71 of file All.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.

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

It returns the maxOccurs values.

Returns
The maxOccurs value.

Definition at line 40 of file Occurs.cpp.

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

It returns the minOccurs values.

Returns
The minOccurs value.

Definition at line 35 of file Occurs.cpp.

References te::xsd::Occurs::m_minOccurs.

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

Assignment operator.

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

Definition at line 54 of file All.cpp.

References m_elementVec, te::xsd::Identifiable::operator=(), te::xsd::Annotated::operator=(), and te::xsd::Occurs::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().

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.

Definition at line 50 of file Occurs.cpp.

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

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.

Definition at line 45 of file Occurs.cpp.

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

Member Data Documentation

boost::ptr_vector<Element> te::xsd::All::m_elementVec
private

Lis of elements. (Optional)

Definition at line 106 of file All.h.

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

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.

Referenced by te::xsd::Occurs::operator=().

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.

Referenced by te::xsd::Occurs::getMinOccurs(), and te::xsd::Occurs::operator=().

const unsigned int te::xsd::Occurs::unbounded = std::numeric_limits<unsigned int>::max()
staticinherited

Identifer for "unbounded" max values.

Definition at line 108 of file Occurs.h.

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


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