MapItem.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/MapItem.cpp
22 
23  \brief
24 */
25 
26 // TerraLib
27 #include "MapItem.h"
28 #include "ParameterValue.h"
29 
31  : m_data(0.0),
32  m_value(nullptr),
33  m_title("")
34 {
35 }
36 
38  : m_data(0),
39  m_value(nullptr),
40  m_title("")
41 {
42  m_data = rhs.m_data;
43  m_value = rhs.m_value->clone();
44  m_title = rhs.m_title;
45 }
46 
48 {
49  delete m_value;
50 }
51 
53 {
54  return new MapItem(*this);
55 }
56 
57 void te::se::MapItem::setData(const double& d)
58 {
59  m_data = d;
60 }
61 
63 {
64  delete m_value;
65  m_value = v;
66 }
67 
69 {
70  return m_data;
71 }
72 
74 {
75  return m_value;
76 }
77 
78 std::string te::se::MapItem::getTitle() const
79 {
80  return m_title;
81 }
82 
83 void te::se::MapItem::setTitle(const std::string& title)
84 {
85  m_title = title;
86 }
double getData() const
Definition: MapItem.cpp:68
double m_data
Mandatory.
Definition: MapItem.h:120
virtual MapItem * clone() const
It returns a clone of this object.
Definition: MapItem.cpp:52
The ParameterValueType uses WFS-Filter expressions to give values for SE graphic parameters.
~MapItem()
Destructor.
Definition: MapItem.cpp:47
std::string getTitle() const
Definition: MapItem.cpp:78
The "ParameterValueType" uses WFS-Filter expressions to give values for SE graphic parameters...
ParameterValue * getValue() const
Definition: MapItem.cpp:73
void setData(const double &d)
Definition: MapItem.cpp:57
void setTitle(const std::string &title)
Definition: MapItem.cpp:83
static te::dt::DateTime d(2010, 8, 9, 15, 58, 39)
ParameterValue * m_value
Mandatory.
Definition: MapItem.h:121
ParameterValue * clone() const
It creates a new copy of this object.
void setValue(ParameterValue *v)
Definition: MapItem.cpp:62
std::string m_title
Definition: MapItem.h:122
MapItem()
It initializes a new MapItem.
Definition: MapItem.cpp:30