Main Page
Modules
Namespaces
Classes
Files
File List
File Members
All.cpp
Go to the documentation of this file.
1
/* Copyright (C) 2008 National Institute For Space Research (INPE) - Brazil.
2
3
This file is part of the TerraLib - a Framework for building GIS enabled applications.
4
5
TerraLib is free software: you can redistribute it and/or modify
6
it under the terms of the GNU General Public License as published by
7
the Free Software Foundation, either version 3 of the License,
8
or (at your option) any later version.
9
10
TerraLib is distributed in the hope that it will be useful,
11
but WITHOUT ANY WARRANTY; without even the implied warranty of
12
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
GNU General Public License for more details.
14
15
You should have received a copy of the GNU General Public License
16
along with TerraLib. See COPYING. If not, write to
17
TerraLib Team at <terralib-team@terralib.org>.
18
*/
19
20
/*!
21
\file All.cpp
22
23
\brief This class models an XML Schema all element.
24
*/
25
26
// TerraLib
27
#include "
All.h
"
28
#include "
Annotation.h
"
29
#include "
Element.h
"
30
31
// STL
32
#include <cassert>
33
34
te::xsd::All::All
(
unsigned
int
minOccurs,
unsigned
int
maxOccurs,
Annotation
* ann, std::string*
id
)
35
:
Occurs
(minOccurs, maxOccurs),
36
Identifiable
(id),
37
Annotated
(ann)
38
{
39
}
40
41
te::xsd::All::All
(
const
All
& rhs)
42
:
Occurs
(rhs),
43
Identifiable
(rhs),
44
Annotated
(rhs)
45
{
46
for
(std::size_t i = 0; i < rhs.
m_elementVec
.size(); ++i)
47
m_elementVec
.push_back(
new
Element
(
m_elementVec
[i]));
48
}
49
50
te::xsd::All::~All
()
51
{
52
}
53
54
te::xsd::All
&
te::xsd::All::operator=
(
const
All
& rhs)
55
{
56
if
(
this
!= &rhs)
57
{
58
Occurs::operator=
(rhs);
59
60
Identifiable::operator=
(rhs);
61
62
Annotated::operator=
(rhs);
63
64
for
(std::size_t i = 0; i < rhs.
m_elementVec
.size(); ++i)
65
m_elementVec.push_back(
new
Element
(rhs.
m_elementVec
[i]));
66
}
67
68
return
*
this
;
69
}
70
71
const
boost::ptr_vector<te::xsd::Element>&
te::xsd::All::getElements
()
const
72
{
73
return
m_elementVec;
74
}
75
76
void
te::xsd::All::addElement
(
te::xsd::Element
* e)
77
{
78
m_elementVec.push_back(e);
79
}
80
81
te::xsd::Content
*
te::xsd::All::clone
()
const
82
{
83
return
new
All
(*
this
);
84
}
te::xsd::All
This class models an XML Schema all element.
Definition:
All.h:54
te::xsd::Annotated
A base class for XSD classes that may allow annotation.
Definition:
Annotated.h:49
te::xsd::Occurs
A base class for XSD classes that have occurs attributes.
Definition:
Occurs.h:43
te::xsd::All::m_elementVec
boost::ptr_vector< Element > m_elementVec
Lis of elements. (Optional)
Definition:
All.h:106
te::xsd::Annotated::operator=
Annotated & operator=(const Annotated &rhs)
Assignment operator.
Definition:
Annotated.cpp:57
te::xsd::Element
This class models the element of a XML Schema.
Definition:
Element.h:56
te::xsd::Content
A base class for elements that are not definitions nor declarations. This class is just for creating ...
Definition:
Content.h:43
te::xsd::All::All
All(unsigned int minOccurs=1, unsigned int maxOccurs=1, Annotation *ann=0, std::string *id=0)
Constructor.
Definition:
All.cpp:34
te::xsd::All::operator=
All & operator=(const All &rhs)
Assignment operator.
Definition:
All.cpp:54
Annotation.h
A class that models a XSD annotation element.
te::xsd::All::addElement
void addElement(Element *e)
It adds an element to this All element.
Definition:
All.cpp:76
te::xsd::Identifiable
A base class for XSD classes that must provide a unique ID property.
Definition:
Identifiable.h:46
te::xsd::All::~All
~All()
Destructor.
Definition:
All.cpp:50
te::xsd::All::getElements
const boost::ptr_vector< Element > & getElements() const
It returns the list of elements of All.
Definition:
All.cpp:71
te::xsd::Identifiable::operator=
Identifiable & operator=(const Identifiable &rhs)
Assignment operator.
Definition:
Identifiable.cpp:56
Element.h
te::xsd::All::clone
Content * clone() const
Definition:
All.cpp:81
All.h
This class models an XML Schema all element.
te::xsd::Annotation
A class that models a XSD annotation element.
Definition:
Annotation.h:55
te::xsd::Occurs::operator=
Occurs & operator=(const Occurs &rhs)
Assignment operator.
Definition:
Occurs.cpp:71
git_master
terralib5
src
terralib
xsd
All.cpp
Generated on Tue Jan 12 2016 08:41:00 for TerraLib by
1.8.9.1