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 
61  Feature();
62 
64 
66 
67  ~Feature();
68 
69  void set(te::da::ObjectId* id, te::gm::Geometry* geom);
70 
71  void setId(te::da::ObjectId* id);
72 
73  void setGeometry(te::gm::Geometry* geom);
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 
81  void setContourDashStyle(te::map::LineDashStyle dashStyle);
82 
83  void setContourWidth(int width);
84 
85  void setOperationTypeId(const te::edit::OperationType& currentOperationType);
86 
87  void setEditable(const bool& editable);
88 
89  te::da::ObjectId* getId() const;
90 
91  te::gm::Geometry* getGeometry() const;
92 
93  const std::map<std::string, te::dt::AbstractData*>& getData() const;
94 
95  te::color::RGBAColor getFillColor() const;
96 
97  te::color::RGBAColor getContourColor() const;
98 
99  te::map::LineDashStyle getContourDashStyle() const;
100 
101  int getContourWidth() const;
102 
103  te::edit::OperationType getOperationTypeId() const;
104 
105  bool hasColorChanged();
106 
107  bool isEquals(te::da::ObjectId* id);
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
std::map< std::string, te::dt::AbstractData * > m_data
Definition: Feature.h:117
te::gm::Geometry * m_geom
Definition: Feature.h:116
#define TEEDITEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:68
te::map::LineDashStyle m_contourDashStyle
Definition: Feature.h:121
te::color::RGBAColor m_fillColor
Definition: Feature.h:119
bool m_colorChanged
Definition: Feature.h:123
te::edit::OperationType m_currentOperationType
Definition: Feature.h:125
This class represents an unique id for a data set element.
Definition: ObjectId.h:47
TerraLib.
Configuration flags for the TerraLib Edit module.
Utility functions for TerraLib Edit module.
Geometry is the root class of the geometries hierarchy, it follows OGC and ISO standards.
Definition: Geometry.h:77
OperationType
Definition: Enums.h:38
LineDashStyle
This enum encodes enumerated values telling how lines should be drawn. e.g. as a plain line or dash l...
Definition: Enums.h:56
Enumerations related to Edit module.
A helper class for 32-bit RGBA (Red-Green-Blue-Alpha channel) color.
Definition: RGBAColor.h:57
te::da::ObjectId * m_id
Definition: Feature.h:115
te::color::RGBAColor m_contourColor
Definition: Feature.h:120