GroupingItem.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 GroupingItem.h
22 
23  \brief This class contains information about a grouping item associated to a layer.
24 */
25 
26 #ifndef __TERRALIB_MAPTOOLS_INTERNAL_GROUPINGITEM_H
27 #define __TERRALIB_MAPTOOLS_INTERNAL_GROUPINGITEM_H
28 
29 // TerraLib
30 #include "../se/Symbolizer.h"
31 #include "Config.h"
32 
33 // STL
34 #include <memory>
35 #include <vector>
36 
37 namespace te
38 {
39  namespace map
40  {
41  /*!
42  \class GroupingItem
43 
44  \brief A GroupingItem contains information about a grouping item associated to a layer.
45 
46  \sa AbstractLayer, Layer
47  */
49  {
50  public:
51 
52  /*!
53  \brief It initializes a new GroupingItem.
54 
55  \param from The value of the lower limit of the legend item.
56  \param to The value of the upper limit of the legend item.
57  */
58  GroupingItem(const std::string& from = "", const std::string& to = "");
59 
60  /*! \brief Destructor. */
61  ~GroupingItem();
62 
63  /*! \brief Copy constructor. */
64  GroupingItem(const GroupingItem& rhs);
65 
66  /*! Assignment operator. */
67  GroupingItem& operator=(const GroupingItem& rhs);
68 
69  /*!
70  \brief It gets the value of the legend item.
71 
72  \output The value of the legend item.
73  */
74  const std::string& getValue() const;
75 
76  /*!
77  \brief It sets value of the legend item.
78 
79  \param value The value of the legend item.
80  */
81  void setValue(const std::string& value);
82 
83  /*!
84  \brief It gets the lower limit value of the legend item.
85 
86  \output The lower limit value of the legend item.
87  */
88  const std::string& getLowerLimit() const;
89 
90  /*!
91  \brief It sets the lower limit value of the legend item.
92 
93  \param from The lower limit value.
94  */
95  void setLowerLimit(const std::string& from);
96 
97  /*!
98  \brief It gets the upper limit value of the legend item.
99 
100  \output The upper limit value of the legend item.
101  */
102  const std::string& getUpperLimit() const;
103 
104  /*!
105  \brief It sets the upper limit value of the legend item.
106 
107  \param to The upper limit value.
108  */
109  void setUpperLimit(const std::string& to);
110 
111  /*!
112  \brief It gets the title of the legend item.
113 
114  \return The title of the legend item.
115  */
116  std::string getTitle();
117 
118  /*!
119  \brief It sets the title of the legend item.
120 
121  \param title The title of the legend item..
122  */
123  void setTitle(const std::string& title);
124 
125  /*!
126  \brief It gets the number of objects whose values are between the lower and upper limits.
127 
128  \output The number of objects whose values are between the lower and upper limits.
129  */
130  std::size_t getCount() const;
131 
132  /*!
133  \brief It It sets the number of objects whose values are between the lower and upper limits.
134 
135  \param count The number of objects whose values are between the lower and upper limits
136  */
137  void setCount(std::size_t count);
138 
139  /*!
140  \brief It gets the symbolizer of the legend item.
141 
142  \output The symbolizer of the legend item.
143  */
144  const std::vector<te::se::Symbolizer*>& getSymbolizers() const;
145 
146  /*!
147  \brief It sets the symbolizers of the legend item.
148 
149  \param symbolizers The symbolizers of the legend item..
150  */
151  void setSymbolizers(const std::vector<te::se::Symbolizer*>& symbolizers);
152 
153  private:
154 
155  std::string m_from; //!< The value of the lower limit of the legend item.
156  std::string m_to; //!< The value of the upper limit of the legend item.
157  std::string m_value; //!< The value of the legend item.
158  std::size_t m_count; //!< The number of objects whose values are between the lower and upper limits.
159  std::string m_title; //!< A text that can be used to identify this legend item.
160  std::vector<te::se::Symbolizer*> m_symbolizers; //!< The color of the legend item.
161  };
162 
163  } // end namespace map
164 } // end namespace te
165 
166 #endif // __TERRALIB_MAPTOOLS_INTERNAL_GROUPINGITEM_H
167 
std::string m_from
The value of the lower limit of the legend item.
Definition: GroupingItem.h:155
std::size_t m_count
The number of objects whose values are between the lower and upper limits.
Definition: GroupingItem.h:158
A GroupingItem contains information about a grouping item associated to a layer.
Definition: GroupingItem.h:48
URI C++ Library.
#define TEMAPEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:60
std::string m_value
The value of the legend item.
Definition: GroupingItem.h:157
std::string m_to
The value of the upper limit of the legend item.
Definition: GroupingItem.h:156
std::string m_title
A text that can be used to identify this legend item.
Definition: GroupingItem.h:159
std::vector< te::se::Symbolizer * > m_symbolizers
The color of the legend item.
Definition: GroupingItem.h:160