All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Notation.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 Notation.cpp
22 
23  \brief This class models a notation element from a XML Schema.
24 */
25 
26 // TerraLib
27 #include "Notation.h"
28 
29 // STL
30 #include <cassert>
31 
32 te::xsd::Notation::Notation(std::string* name, std::string* pub, Annotation* ann, std::string* id)
33  : Identifiable(id),
34  Annotated(ann),
35  m_name(name),
36  m_public(pub),
37  m_system(0)
38 {
39  assert(m_name);
40  assert(m_public);
41 }
42 
44  : Identifiable(rhs),
45  Annotated(rhs),
46  m_name(0),
47  m_public(0),
48  m_system(0)
49 {
50 }
51 
53 {
54  delete m_name;
55  delete m_public;
56 }
57 
59 {
60  return *this;
61 }
62 
63 std::string* te::xsd::Notation::getName() const
64 {
65  return m_name;
66 }
67 
68 std::string* te::xsd::Notation::getPublic() const
69 {
70  return m_public;
71 }
72 
73 std::string* te::xsd::Notation::getSystem() const
74 {
75  return m_system;
76 }
77 
78 void te::xsd::Notation::setName(std::string* name)
79 {
80  assert(name);
81  delete m_name;
82  m_name = name;
83 }
84 
85 void te::xsd::Notation::setPublic(std::string* pub)
86 {
87  assert(pub);
88  delete m_public;
89  m_public = pub;
90 }
91 
92 void te::xsd::Notation::setSystem(std::string* sys)
93 {
94  delete m_system;
95  m_system = sys;
96 }
Notation(std::string *name, std::string *pub, Annotation *ann=0, std::string *id=0)
Constructor.
Definition: Notation.cpp:32
~Notation()
Destructor.
Definition: Notation.cpp:52
void setPublic(std::string *pub)
It sets the URI corresponding to the public identifier.
Definition: Notation.cpp:85
A base class for XSD classes that may allow annotation.
Definition: Annotated.h:49
std::string * getPublic() const
It returns the URI corresponding to the public identifier.
Definition: Notation.cpp:68
std::string * getName() const
It returns the name of this element.
Definition: Notation.cpp:63
This class models a notation element from a XML Schema.
std::string * getSystem() const
It returns the URI corresponding to the system identifier.
Definition: Notation.cpp:73
void setSystem(std::string *sys)
It sets the URI corresponding to the system identifier.
Definition: Notation.cpp:92
Notation & operator=(const Notation &rhs)
Assignment operator.
Definition: Notation.cpp:58
A base class for XSD classes that must provide a unique ID property.
Definition: Identifiable.h:46
std::string * m_public
It specifies a URI corresponding to the public identifier. (Required)
Definition: Notation.h:133
A class that models a XSD annotation element.
Definition: Annotation.h:55
This class models a notation element from a XML Schema.
Definition: Notation.h:44
std::string * m_name
It specifies a name for the element. (Required)
Definition: Notation.h:132
void setName(std::string *name)
It sets the name of this element.
Definition: Notation.cpp:78