Feature.h
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/edit/Feature.h
22 
23  \brief This class represents a geographic feature.
24 */
25 
26 #ifndef __TERRALIB_EDIT_INTERNAL_FEATURE_H
27 #define __TERRALIB_EDIT_INTERNAL_FEATURE_H
28 
29 // TerraLib
30 #include "Config.h"
31 #include "Enums.h"
32 #include "Utils.h"
33 
34 // STL
35 #include <map>
36 
37 namespace te
38 {
39 // Forward declarations
40  namespace da
41  {
42  class ObjectId;
43  }
44 
45  namespace dt
46  {
47  class AbstractData;
48  }
49 
50  namespace gm
51  {
52  class Geometry;
53  }
54 
55  namespace edit
56  {
58  {
59  public:
60 
62 
64 
66 
68 
70 
72 
74 
75  void setData(const std::map<std::string, te::dt::AbstractData*>& data);
76 
77  void setFillColor(const te::color::RGBAColor& fillColor);
78 
79  void setContourColor(const te::color::RGBAColor& contourColor);
80 
82 
83  void setContourWidth(int width);
84 
85  void setOperationTypeId(const te::edit::OperationType& currentOperationType);
86 
87  void setEditable(const bool& editable);
88 
90 
92 
93  const std::map<std::string, te::dt::AbstractData*>& getData() const;
94 
96 
98 
100 
101  int getContourWidth() const;
102 
104 
106 
108 
109  bool isEditable() const;
110 
111  Feature* clone() const;
112 
113  private:
114 
117  std::map<std::string, te::dt::AbstractData*> m_data;
118 
124 
127 
128  };
129 
130  } // end namespace edit
131 } // end namespace te
132 
133 #endif // __TERRALIB_EDIT_INTERNAL_FEATURE_H
te::edit::Feature::setFillColor
void setFillColor(const te::color::RGBAColor &fillColor)
te::da::ObjectId
This class represents an unique id for a data set element.
Definition: ObjectId.h:48
te
TerraLib.
Definition: AddressGeocodingOp.h:52
te::edit::Feature::getId
te::da::ObjectId * getId() const
te::edit::Feature::setEditable
void setEditable(const bool &editable)
te::edit::Feature::m_geom
te::gm::Geometry * m_geom
Definition: Feature.h:116
te::edit::Feature::~Feature
~Feature()
te::edit::Feature::isEquals
bool isEquals(te::da::ObjectId *id)
te::edit::Feature::setGeometry
void setGeometry(te::gm::Geometry *geom)
te::edit::Feature::m_fillColor
te::color::RGBAColor m_fillColor
Definition: Feature.h:119
te::edit::OperationType
OperationType
Definition: Enums.h:39
TEEDITEXPORT
#define TEEDITEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:68
te::edit::Feature::getGeometry
te::gm::Geometry * getGeometry() const
te::edit::Feature::setContourColor
void setContourColor(const te::color::RGBAColor &contourColor)
te::edit::Feature::Feature
Feature()
te::edit::Feature::Feature
Feature(te::da::ObjectId *id)
Enums.h
Enumerations of XML module.
te::edit::Feature::setContourWidth
void setContourWidth(int width)
te::map::LineDashStyle
LineDashStyle
This enum encodes enumerated values telling how lines should be drawn. e.g. as a plain line or dash l...
Definition: Enums.h:57
te::edit::Feature::m_contourWidth
int m_contourWidth
Definition: Feature.h:122
te::edit::Feature::getContourDashStyle
te::map::LineDashStyle getContourDashStyle() const
te::edit::Feature::setData
void setData(const std::map< std::string, te::dt::AbstractData * > &data)
te::edit::Feature::getData
const std::map< std::string, te::dt::AbstractData * > & getData() const
te::edit::Feature::getFillColor
te::color::RGBAColor getFillColor() const
te::edit::Feature::getContourWidth
int getContourWidth() const
te::edit::Feature::m_isEditable
bool m_isEditable
Definition: Feature.h:126
te::edit::Feature::setContourDashStyle
void setContourDashStyle(te::map::LineDashStyle dashStyle)
te::edit::Feature::clone
Feature * clone() const
te::edit::Feature::setId
void setId(te::da::ObjectId *id)
te::edit::Feature::m_contourColor
te::color::RGBAColor m_contourColor
Definition: Feature.h:120
te::edit::Feature::hasColorChanged
bool hasColorChanged()
te::color::RGBAColor
A helper class for 32-bit RGBA (Red-Green-Blue-Alpha channel) color.
Definition: RGBAColor.h:58
te::edit::Feature::set
void set(te::da::ObjectId *id, te::gm::Geometry *geom)
te::edit::Feature::Feature
Feature(te::da::ObjectId *id, te::gm::Geometry *geom)
te::edit::Feature
Definition: Feature.h:58
te::edit::Feature::m_currentOperationType
te::edit::OperationType m_currentOperationType
Definition: Feature.h:125
te::edit::Feature::m_data
std::map< std::string, te::dt::AbstractData * > m_data
Definition: Feature.h:117
te::edit::Feature::getContourColor
te::color::RGBAColor getContourColor() const
te::edit::Feature::m_id
te::da::ObjectId * m_id
Definition: Feature.h:115
Config.h
Proxy configuration file for TerraView (see terraview_config.h).
te::edit::Feature::m_colorChanged
bool m_colorChanged
Definition: Feature.h:123
te::edit::Feature::setOperationTypeId
void setOperationTypeId(const te::edit::OperationType &currentOperationType)
te::gm::Geometry
Geometry is the root class of the geometries hierarchy, it follows OGC and ISO standards.
Definition: Geometry.h:78
te::edit::Feature::m_contourDashStyle
te::map::LineDashStyle m_contourDashStyle
Definition: Feature.h:121
Utils.h
te::edit::Feature::getOperationTypeId
te::edit::OperationType getOperationTypeId() const
te::edit::Feature::isEditable
bool isEditable() const