All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Symbolizer.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 Lesser 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 Lesser General Public License for more details.
14 
15  You should have received a copy of the GNU Lesser 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 terralib/se/Symbolizer.cpp
22 
23  \brief A Symbolizer describes how a Feature is to appear on a map.
24 */
25 
26 // TerraLib
27 #include "../common/Exception.h"
28 #include "../common/Translator.h"
29 #include "../common/UnitOfMeasure.h"
30 #include "../common/UnitsOfMeasureManager.h"
31 #include "../xlink/SimpleLink.h"
32 #include "Description.h"
33 #include "Symbolizer.h"
34 
36  : m_description(0),
37  m_baseSymbolizer(0),
38  m_version(TE_SE_DEFAULT_VERSION),
39  m_uom(0)
40 {
41 }
42 
44  : m_name(rhs.m_name),
45  m_description(0),
46  m_baseSymbolizer(0),
47  m_version(rhs.m_version),
48  m_uom(0)
49 {
50  if(rhs.m_description)
52 
53  if(rhs.m_baseSymbolizer)
55 
56  // TODO: Review BaseUnitOfMeasure
57  //if(rhs.m_uom)
58  //m_uom = new te::common::BaseUnitOfMeasure(*m_uom);
59 }
60 
62 {
63  delete m_description;
64  delete m_baseSymbolizer;
65 }
66 
67 void te::se::Symbolizer::setName(const std::string& name)
68 {
69  m_name = name;
70 }
71 
72 const std::string& te::se::Symbolizer::getName() const
73 {
74  return m_name;
75 }
76 
78 {
79  delete m_description;
80  m_description = d;
81 }
82 
84 {
85  return m_description;
86 }
87 
89 {
90  delete m_baseSymbolizer;
91  m_baseSymbolizer = baseSymbolizer;
92 }
93 
95 {
96  return m_baseSymbolizer;
97 }
98 
99 void te::se::Symbolizer::setVersion(const std::string& version)
100 {
101  m_version = version;
102 }
103 
104 const std::string& te::se::Symbolizer::getVersion() const
105 {
106  return m_version;
107 }
108 
109 void te::se::Symbolizer::setUom(const te::common::BaseUnitOfMeasure* uom)
110 {
111  m_uom = uom;
112 }
113 
114 const te::common::BaseUnitOfMeasure* te::se::Symbolizer::getUom() const
115 {
116  return m_uom;
117 }
#define TE_SE_DEFAULT_VERSION
It specifies the default version used by OGC Symbology Encoding.
Definition: Config.h:114
void setVersion(const std::string &version)
Definition: Symbolizer.cpp:99
A Description gives human-readable descriptive information for the object it is included within...
Definition: Description.h:56
te::xl::SimpleLink * m_baseSymbolizer
A BaseSymbolizer (an OnlineResource) defines the default properties of a Symbolizer to be those of an...
Definition: Symbolizer.h:164
A Symbolizer describes how a feature is to appear on a map.
Definition: Symbolizer.h:80
void setUom(const te::common::BaseUnitOfMeasure *uom)
It sets the unit-of-measure.
Definition: Symbolizer.cpp:109
const std::string & getVersion() const
Definition: Symbolizer.cpp:104
A Description gives human-readable descriptive information for the object it is included within...
Symbolizer()
It initializes a new Symbolizer.
Definition: Symbolizer.cpp:35
void setName(const std::string &name)
Definition: Symbolizer.cpp:67
void setBaseSymbolizer(te::xl::SimpleLink *baseSymbolizer)
Definition: Symbolizer.cpp:88
const std::string & getName() const
Definition: Symbolizer.cpp:72
Description * clone() const
It creates a new copy of this object.
Definition: Description.cpp:57
const te::common::BaseUnitOfMeasure * getUom() const
Definition: Symbolizer.cpp:114
void setDescription(Description *d)
Definition: Symbolizer.cpp:77
Description * m_description
It gives the familiar short title for display lists and longer description for the symbolizer...
Definition: Symbolizer.h:163
const Description * getDescription() const
Definition: Symbolizer.cpp:83
const te::xl::SimpleLink * getBaseSymbolizer() const
Definition: Symbolizer.cpp:94
A Symbolizer describes how a Feature is to appear on a map.
virtual ~Symbolizer()
Virtual destructor.
Definition: Symbolizer.cpp:61