All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 
32 // STL
33 #include <map>
34 
35 namespace te
36 {
37 // Forward declarations
38  namespace da
39  {
40  class ObjectId;
41  }
42 
43  namespace dt
44  {
45  class AbstractData;
46  }
47 
48  namespace gm
49  {
50  class Geometry;
51  }
52 
53  namespace edit
54  {
56  {
57  public:
58 
59  Feature();
60 
62 
64 
65  ~Feature();
66 
67  void set(te::da::ObjectId* id, te::gm::Geometry* geom);
68 
69  void setId(te::da::ObjectId* id);
70 
71  void setGeometry(te::gm::Geometry* geom);
72 
73  void setData(const std::map<std::size_t, te::dt::AbstractData*>& data);
74 
75  te::da::ObjectId* getId() const;
76 
77  te::gm::Geometry* getGeometry() const;
78 
79  const std::map<std::size_t, te::dt::AbstractData*>& getData() const;
80 
81  bool isEquals(te::da::ObjectId* id);
82 
83  Feature* clone() const;
84 
85  private:
86 
89  std::map<std::size_t, te::dt::AbstractData*> m_data;
90  };
91 
92  } // end namespace edit
93 } // end namespace te
94 
95 #endif // __TERRALIB_EDIT_INTERNAL_FEATURE_H
te::gm::Geometry * m_geom
Definition: Feature.h:88
#define TEEDITEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:67
std::map< std::size_t, te::dt::AbstractData * > m_data
Definition: Feature.h:89
This class represents an unique id for a data set element.
Definition: ObjectId.h:47
Configuration flags for the TerraLib Edit module.
Geometry is the root class of the geometries hierarchy, it follows OGC and ISO standards.
Definition: Geometry.h:73
te::da::ObjectId * m_id
Definition: Feature.h:87