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::size_t, 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 setOperationTypeId(const te::edit::OperationType& currentOperationType);
82 
83  void setEditable(const bool& editable);
84 
85  te::da::ObjectId* getId() const;
86 
87  te::gm::Geometry* getGeometry() const;
88 
89  const std::map<std::size_t, te::dt::AbstractData*>& getData() const;
90 
91  te::color::RGBAColor getFillColor() const;
92 
93  te::color::RGBAColor getContourColor() const;
94 
95  te::edit::OperationType getOperationTypeId() const;
96 
97  bool hasColorChanged();
98 
99  bool isEquals(te::da::ObjectId* id);
100 
101  bool isEditable() const;
102 
103  Feature* clone() const;
104 
105  private:
106 
109  std::map<std::size_t, te::dt::AbstractData*> m_data;
110 
114 
117 
118  };
119 
120  } // end namespace edit
121 } // end namespace te
122 
123 #endif // __TERRALIB_EDIT_INTERNAL_FEATURE_H
te::gm::Geometry * m_geom
Definition: Feature.h:108
#define TEEDITEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:68
std::map< std::size_t, te::dt::AbstractData * > m_data
Definition: Feature.h:109
te::color::RGBAColor m_fillColor
Definition: Feature.h:111
bool m_colorChanged
Definition: Feature.h:113
te::edit::OperationType m_currentOperationType
Definition: Feature.h:115
This class represents an unique id for a data set element.
Definition: ObjectId.h:47
URI C++ Library.
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:75
OperationType
Definition: Enums.h:38
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:107
te::color::RGBAColor m_contourColor
Definition: Feature.h:112