ColorSchemeCatalog.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/color/ColorSchemeCatalog.h
22 
23  \brief A catalog for color schemes groups.
24 */
25 
26 #ifndef __TERRALIB_COLOR_INTERNAL_COLORSCHEMECATALOG_H
27 #define __TERRALIB_COLOR_INTERNAL_COLORSCHEMECATALOG_H
28 
29 // TerraLib
30 #include "Config.h"
31 
32 // STL
33 #include <string>
34 #include <vector>
35 
36 namespace te
37 {
38  namespace color
39  {
40 // Forward declarations
41  class ColorSchemeGroup;
42 
43  /*!
44  \class ColorSchemeCatalog
45 
46  \brief A catalog for color schemes.
47 
48  A color scheme catalog contains several
49  color scheme groups that can be choosed by the user
50  in order to color a given map.
51 
52  \ingroup color
53 
54  \sa ColorScheme, ColorSchemeGroup, ColorSchemeCatalogManager
55 
56  \note Any doubts, please, send us an e-mail to help improve the documentation quality!
57  */
59  {
60  public:
61 
62  /** @name Initializer Methods
63  * Methods related to instantiation and destruction.
64  */
65  //@{
66 
67  /*!
68  \brief It initializes a new ColorSchemeCatalog.
69 
70  \param name The catalog name.
71  */
72  ColorSchemeCatalog(const std::string& name);
73 
74  /*! \brief Destructor. */
76 
77  //@}
78 
79  /** @name Accessor methods
80  * Methods used to get or set properties.
81  */
82  //@{
83 
84  /*!
85  \brief It returns the catalog name.
86 
87  \return The catalog name.
88  */
89  const std::string& getName() const;
90 
91  /*!
92  \brief It changes the catalog name and adjusts its entry in the catalog manager if needed.
93 
94  \param newName The new catalog name (must be a non-empty value).
95  */
96  void setName(const std::string& newName);
97 
98  /*!
99  \brief It returns the catalog description.
100 
101  \return The catalog description.
102  */
103  const std::string& getDescription() const;
104 
105  /*!
106  \brief It sets the catalog description.
107 
108  \param d The catalog description.
109  */
110  void setDescription(const std::string& d);
111 
112  /*!
113  \brief It returns the catalog author name.
114 
115  \return The catalog author name.
116  */
117  const std::string& getAuthor() const;
118 
119  /*!
120  \brief It sets the catalog author name.
121 
122  \param author The catalog author name.
123  */
124  void setAuthor(const std::string& author);
125 
126  /*!
127  \brief It returns the catalog copyright notice.
128 
129  \return The catalog copyright notice.
130  */
131  const std::string& getCopyright() const;
132 
133  /*!
134  \brief It sets the catalog copyright notice.
135 
136  \param c The catalog copyright notice.
137  */
138  void setCopyright(const std::string& c);
139 
140  /*!
141  \brief It returns a link for more information about the catalog.
142 
143  \return A link for more information about the catalog.
144  */
145  const std::string& getOnlineResource() const;
146 
147  /*!
148  \brief It sets the link for more information about the catalog.
149 
150  \param r The link for more information about the catalog.
151  */
152  void setOnlineResource(const std::string& r);
153 
154  /*!
155  \brief It adds a new group to the catalog and sets its relationship.
156 
157  \param group The group that will take part of the catalog.
158 
159  \note The catalog will take the ownership of the group.
160 
161  \note Don't inform a NULL pointer.
162  */
163  void push_back(ColorSchemeGroup* group);
164 
165  /*!
166  \brief It removes the internal reference to the group.
167 
168  \param group The group to remove the internal reference.
169 
170  \note The caller of thi smethod will take the ownership of the group.
171  */
172  void disconnect(ColorSchemeGroup* group);
173 
174  /*!
175  \brief It returns the list of color scheme groups in the catalog.
176 
177  \return The list of color scheme groups in the catalog.
178  */
179  const std::vector<ColorSchemeGroup*>& getColorSchemeGroups() const;
180 
181  //@}
182 
183  private:
184 
185  /** @name Copy Constructor and Assignment Operator
186  * Copy constructor and assignment operator not allowed.
187  */
188  //@{
189 
190  /*!
191  \brief Copy constructor not allowed.
192 
193  \param rhs The right-hand-side copy that would be used to copy from.
194  */
196 
197  /*!
198  \brief Assignment operator not allowed.
199 
200  \param rhs The right-hand-side copy that would be used to copy from.
201 
202  \return A reference to this object.
203  */
204  ColorSchemeCatalog& operator=(const ColorSchemeCatalog& rhs);
205 
206  //@}
207 
208  private:
209 
210  std::string m_name; //!< Catalog name.
211  std::string m_description; //!< A brief description about the catalog.
212  std::string m_author; //!< Information about catalog author.
213  std::string m_copyright; //!< Copyright notice.
214  std::string m_onlineResource; //!< A link location for more information on the catalog.
215  std::vector<ColorSchemeGroup*> m_colorSchemeGroups; //!< The color scheme groups.
216  };
217 
218  } // end namespace color
219 } // end namespace te
220 
221 #endif // __TERRALIB_COLOR_INTERNAL_COLORSCHEMECATALOG_H
222 
std::string m_description
A brief description about the catalog.
Configuration flags for the Color module of TerraLib.
std::vector< ColorSchemeGroup * > m_colorSchemeGroups
The color scheme groups.
URI C++ Library.
std::string m_name
Catalog name.
std::string m_copyright
Copyright notice.
std::string m_author
Information about catalog author.
This class represents a group of color schemes.
A catalog for color schemes.
std::string m_onlineResource
A link location for more information on the catalog.
#define TECOLOREXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:73