Main Page
Modules
Namespaces
Classes
Files
File List
File Members
Mark.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/Mark.cpp
22
23
\brief A Mark specifies a geometric shape and applies coloring to it.
24
*/
25
26
// TerraLib
27
#include "../xlink/SimpleLink.h"
28
#include "
Fill.h
"
29
#include "
InlineContent.h
"
30
#include "
Mark.h
"
31
#include "
Stroke.h
"
32
33
te::se::Mark::Mark
()
34
: m_wellKnownName(0),
35
m_onlineResource(0),
36
m_inlineContent(0),
37
m_format(0),
38
m_markIndex(-1),
39
m_fill(0),
40
m_stroke(0)
41
{
42
}
43
44
te::se::Mark::~Mark
()
45
{
46
delete
m_wellKnownName;
47
delete
m_onlineResource;
48
delete
m_inlineContent;
49
delete
m_format;
50
delete
m_fill;
51
delete
m_stroke;
52
}
53
54
void
te::se::Mark::setWellKnownName
(std::string* name)
55
{
56
delete
m_wellKnownName;
57
m_wellKnownName = name;
58
}
59
60
const
std::string*
te::se::Mark::getWellKnownName
()
const
61
{
62
return
m_wellKnownName;
63
}
64
65
void
te::se::Mark::setOnlineResource
(
te::xl::SimpleLink
* link)
66
{
67
delete
m_onlineResource;
68
m_onlineResource = link;
69
}
70
71
const
te::xl::SimpleLink
*
te::se::Mark::getOnlineResource
()
const
72
{
73
return
m_onlineResource;
74
}
75
76
void
te::se::Mark::setInlineContent
(
InlineContent
* iContent)
77
{
78
delete
m_inlineContent;
79
m_inlineContent = iContent;
80
}
81
82
te::se::InlineContent
*
te::se::Mark::getInlineContent
()
const
83
{
84
return
m_inlineContent;
85
}
86
87
void
te::se::Mark::setFormat
(std::string* f)
88
{
89
delete
m_format;
90
m_format = f;
91
}
92
93
const
std::string*
te::se::Mark::getFormat
()
const
94
{
95
return
m_format;
96
}
97
98
void
te::se::Mark::setMarkIndex
(
int
i)
99
{
100
m_markIndex = i;
101
}
102
103
int
te::se::Mark::getMarkIndex
()
const
104
{
105
return
m_markIndex;
106
}
107
108
void
te::se::Mark::setFill
(
Fill
* f)
109
{
110
delete
m_fill;
111
m_fill = f;
112
}
113
114
const
te::se::Fill
*
te::se::Mark::getFill
()
const
115
{
116
return
m_fill;
117
}
118
119
void
te::se::Mark::setStroke
(
Stroke
* s)
120
{
121
delete
m_stroke;
122
m_stroke = s;
123
}
124
125
const
te::se::Stroke
*
te::se::Mark::getStroke
()
const
126
{
127
return
m_stroke;
128
}
129
130
te::se::Mark
*
te::se::Mark::clone
()
const
131
{
132
Mark
* mark =
new
Mark
;
133
134
mark->
setMarkIndex
(m_markIndex);
135
136
if
(m_wellKnownName)
137
mark->
setWellKnownName
(
new
std::string(*m_wellKnownName));
138
139
if
(m_stroke)
140
mark->
setStroke
(m_stroke->clone());
141
142
if
(m_fill)
143
mark->
setFill
(m_fill->clone());
144
145
if
(m_onlineResource)
146
mark->
setOnlineResource
(
new
te::xl::SimpleLink
(*m_onlineResource));
147
148
if
(m_inlineContent)
149
mark->
setInlineContent
(m_inlineContent->clone());
150
151
if
(m_format)
152
mark->
setFormat
(
new
std::string(*m_format));
153
154
return
mark;
155
}
te::se::Mark::getMarkIndex
int getMarkIndex() const
Definition:
Mark.cpp:103
te::se::Mark
A Mark specifies a geometric shape and applies coloring to it.
Definition:
Mark.h:84
Fill.h
A Fill specifies the pattern for filling an area geometry.
te::xl::SimpleLink
Simple link.
Definition:
SimpleLink.h:48
te::se::Mark::setFill
void setFill(Fill *f)
Definition:
Mark.cpp:108
te::se::InlineContent
InlineContent is XML- or base64-encoded encoded content in some externally-defined format that is inc...
Definition:
InlineContent.h:51
te::se::Mark::getFormat
const std::string * getFormat() const
Definition:
Mark.cpp:93
te::se::Mark::setOnlineResource
void setOnlineResource(te::xl::SimpleLink *link)
Definition:
Mark.cpp:65
InlineContent.h
InlineContent is XML or base64 encoded content in some externally-defined format that is included in ...
te::se::Mark::setInlineContent
void setInlineContent(InlineContent *iContent)
Definition:
Mark.cpp:76
te::se::Mark::~Mark
~Mark()
Destructor.
Definition:
Mark.cpp:44
te::se::Mark::Mark
Mark()
It initializes a new Mark.
Definition:
Mark.cpp:33
te::se::Fill
A Fill specifies the pattern for filling an area geometry.
Definition:
Fill.h:59
te::se::Mark::getWellKnownName
const std::string * getWellKnownName() const
Definition:
Mark.cpp:60
te::se::Mark::getStroke
const Stroke * getStroke() const
Definition:
Mark.cpp:125
te::se::Mark::getOnlineResource
const te::xl::SimpleLink * getOnlineResource() const
Definition:
Mark.cpp:71
Mark.h
A Mark specifies a geometric shape and applies coloring to it.
te::se::Mark::setMarkIndex
void setMarkIndex(int i)
Definition:
Mark.cpp:98
te::se::Mark::getInlineContent
InlineContent * getInlineContent() const
Definition:
Mark.cpp:82
te::se::Stroke
A Stroke specifies the appearance of a linear geometry.
Definition:
Stroke.h:67
te::se::Mark::setFormat
void setFormat(std::string *f)
Definition:
Mark.cpp:87
te::se::Mark::setStroke
void setStroke(Stroke *s)
Definition:
Mark.cpp:119
te::se::Mark::clone
Mark * clone() const
It creates a new copy of this object.
Definition:
Mark.cpp:130
te::se::Mark::setWellKnownName
void setWellKnownName(std::string *name)
The WellKnownName element gives the well-known name of the shape of the mark.
Definition:
Mark.cpp:54
Stroke.h
A Stroke specifies the appearance of a linear geometry.
te::se::Mark::getFill
const Fill * getFill() const
Definition:
Mark.cpp:114
git_master
terralib5
src
terralib
se
Mark.cpp
Generated on Tue Jan 12 2016 08:40:59 for TerraLib by
1.8.9.1