PointSymbolizer.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/PointSymbolizer.cpp
22 
23  \brief A PointSymbolizer specifies the rendering of a graphic Symbolizer at a point.
24 */
25 
26 // TerraLib
27 #include "../fe/PropertyName.h"
28 #include "Graphic.h"
29 #include "PointSymbolizer.h"
30 
31 const std::string te::se::PointSymbolizer::sm_type("PointSymbolizer");
32 
34  : m_geometry(nullptr), m_graphic(nullptr)
35 {
36 }
37 
39  : te::se::Symbolizer(rhs),
40  m_geometry(nullptr),
41  m_graphic(nullptr)
42 {
43  if(rhs.m_geometry)
45 
46  if(rhs.m_graphic)
47  m_graphic = rhs.m_graphic->clone();
48 }
49 
51 {
52  delete m_geometry;
53  delete m_graphic;
54 }
55 
57 {
58  delete m_geometry;
59  m_geometry = geometry;
60 }
61 
63 {
64  return m_geometry;
65 }
66 
68 {
69  delete m_graphic;
70  m_graphic = graphic;
71 }
72 
74 {
75  return m_graphic;
76 }
77 
78 const std::string& te::se::PointSymbolizer::getType() const
79 {
80  return sm_type;
81 
82 }
84 {
85  return new PointSymbolizer(*this);
86 }
const std::string & getName() const
It returns the property name.
PointSymbolizer()
It initializes a new PointSymbolizer.
const Graphic * getGraphic() const
const te::fe::PropertyName * getGeometry() const
void setGeometry(te::fe::PropertyName *geometry)
A Symbolizer describes how a feature is to appear on a map.
Definition: Symbolizer.h:80
~PointSymbolizer()
Destructor.
A PointSymbolizer specifies the rendering of a graphic Symbolizer at a point.
A Graphic is a graphic symbol with an inherent shape, color(s), and possibly size.
Definition: Graphic.h:66
Graphic * clone() const
It creates a new copy of this object.
Definition: Graphic.cpp:167
This class is used to encode the name of any property of an object.
URI C++ Library.
Definition: Attributes.h:37
static const std::string sm_type
A static data member used in the implementation of getType method.
const std::string & getType() const
It returns the symbolizer type.
te::fe::PropertyName * m_geometry
A Geometry gives reference to a (the) geometry property of a feature to be used for rendering...
A Graphic is a graphic symbol with an inherent shape, color(s), and possibly size.
Symbolizer * clone() const
It creates a new copy of this object.
Graphic * m_graphic
A Graphic specifies or refers to a graphic Symbolizer with inherent shape, size, and coloring...
A PointSymbolizer specifies the rendering of a graphic Symbolizer at a point.
void setGraphic(Graphic *graphic)