All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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  : te::se::Symbolizer(),
35  m_geometry(0),
36  m_graphic(0)
37 {
38 }
39 
41  : te::se::Symbolizer(rhs),
42  m_geometry(0),
43  m_graphic(0)
44 {
45  if(rhs.m_geometry)
47 
48  if(rhs.m_graphic)
49  m_graphic = rhs.m_graphic->clone();
50 }
51 
53 {
54  delete m_geometry;
55  delete m_graphic;
56 }
57 
59 {
60  delete m_geometry;
61  m_geometry = geometry;
62 }
63 
65 {
66  return m_geometry;
67 }
68 
70 {
71  delete m_graphic;
72  m_graphic = graphic;
73 }
74 
76 {
77  return m_graphic;
78 }
79 
80 const std::string& te::se::PointSymbolizer::getType() const
81 {
82  return sm_type;
83 
84 }
86 {
87  return new PointSymbolizer(*this);
88 }
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.
Definition: PropertyName.h:54
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)