Main Page
Modules
Namespaces
Classes
Files
File List
File Members
Group.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 Group.cpp
22
23
\brief This class models a group element in a XML Schema.
24
*/
25
26
// TerraLib
27
#include "
Content.h
"
28
#include "
Group.h
"
29
#include "
QName.h
"
30
31
te::xsd::Group::Group
(
unsigned
int
minOccurs,
unsigned
int
maxOccurs,
Annotation
* ann, std::string*
id
)
32
:
Occurs
(minOccurs, maxOccurs),
33
Identifiable
(id),
34
Annotated
(ann),
35
m_name(0),
36
m_ref(0),
37
m_content(0)
38
{
39
}
40
41
te::xsd::Group::Group
(
const
Group
& rhs)
42
:
Occurs
(rhs),
43
Identifiable
(rhs),
44
Annotated
(rhs),
45
m_name(0),
46
m_ref(0),
47
m_content(0)
48
{
49
}
50
51
te::xsd::Group::~Group
()
52
{
53
delete
m_name;
54
delete
m_ref;
55
delete
m_content;
56
}
57
58
te::xsd::Group
&
te::xsd::Group::operator=
(
const
Group
& rhs)
59
{
60
return
*
this
;
61
}
62
63
std::string*
te::xsd::Group::getName
()
const
64
{
65
return
m_name;
66
}
67
68
te::xsd::QName
*
te::xsd::Group::getRef
()
const
69
{
70
return
m_ref;
71
}
72
73
te::xsd::Content
*
te::xsd::Group::getContent
()
const
74
{
75
return
m_content;
76
}
77
78
void
te::xsd::Group::setName
(std::string* name)
79
{
80
delete
m_name;
81
m_name = name;
82
83
delete
m_ref;
84
m_ref = 0;
85
}
86
87
void
te::xsd::Group::setRef
(
te::xsd::QName
* ref)
88
{
89
delete
m_ref;
90
m_ref = ref;
91
92
delete
m_name;
93
m_name = 0;
94
}
95
96
void
te::xsd::Group::setContent
(
te::xsd::Content
* c)
97
{
98
delete
m_content;
99
m_content = c;
100
}
101
102
te::xsd::Content
*
te::xsd::Group::clone
()
const
103
{
104
return
new
Group
(*
this
);
105
}
te::xsd::Group::setRef
void setRef(QName *ref)
It sets a reference to a name of another group.
Definition:
Group.cpp:87
te::xsd::Annotated
A base class for XSD classes that may allow annotation.
Definition:
Annotated.h:49
Group.h
This class models a group element in a XML Schema.
te::xsd::Occurs
A base class for XSD classes that have occurs attributes.
Definition:
Occurs.h:43
te::xsd::Group::setContent
void setContent(Content *c)
It sets the group content. It can be one of: all | choice | sequence.
Definition:
Group.cpp:96
te::xsd::Group::getContent
Content * getContent() const
It returns the content of this group.
Definition:
Group.cpp:73
te::xsd::Group::getName
std::string * getName() const
It returns the name of the group.
Definition:
Group.cpp:63
te::xsd::Content
A base class for elements that are not definitions nor declarations. This class is just for creating ...
Definition:
Content.h:43
QName.h
A class to deal with XML qualified names.
Content.h
A base class for elements that are not definitions nor declarations. This class is just for creating ...
te::xsd::Group::operator=
Group & operator=(const Group &rhs)
Assignment operator.
Definition:
Group.cpp:58
te::xsd::Identifiable
A base class for XSD classes that must provide a unique ID property.
Definition:
Identifiable.h:46
te::xsd::Group::setName
void setName(std::string *name)
It sets a name for the group.
Definition:
Group.cpp:78
te::xsd::Group::~Group
~Group()
Destructor.
Definition:
Group.cpp:51
te::xsd::QName
A class to be used to represent XML qualified names.
Definition:
QName.h:49
te::xsd::Group::clone
Content * clone() const
Definition:
Group.cpp:102
te::xsd::Group::getRef
QName * getRef() const
It returns the reference to a name of another group.
Definition:
Group.cpp:68
te::xsd::Annotation
A class that models a XSD annotation element.
Definition:
Annotation.h:55
te::xsd::Group::Group
Group(unsigned int minOccurs=1, unsigned int maxOccurs=1, Annotation *ann=0, std::string *id=0)
Constructor.
Definition:
Group.cpp:31
te::xsd::Group
This class models a group element in a XML Schema.
Definition:
Group.h:52
git_master
terralib5
src
terralib
xsd
Group.cpp
Generated on Tue Jan 12 2016 08:41:00 for TerraLib by
1.8.9.1