All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Enums.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 Enums.h
22 
23  \brief Singleton class responsible for keeping active objects of Enum while the plugin is loaded in memory
24  and make them available for access anywhere in the plugin or layout module.
25  Ex .: Enum for data type, enum for object type, enum for mode type, enum for template type, etc.
26 
27  \ingroup layout
28 */
29 
30 #ifndef __TERRALIB_LAYOUT_INTERNAL_ENUMS_H
31 #define __TERRALIB_LAYOUT_INTERNAL_ENUMS_H
32 
33 // TerraLib
34 #include "../../../common/Singleton.h"
35 #include "../Config.h"
36 #include "EnumType.h"
37 #include "EnumDataType.h"
38 #include "EnumObjectType.h"
39 #include "EnumGridStyleType.h"
40 #include "EnumLineStyleType.h"
41 #include "EnumModeType.h"
42 #include "EnumTemplateType.h"
43 
44 namespace te
45 {
46  namespace layout
47  {
48  /*!
49  \brief Singleton class responsible for keeping active objects of Enum while the plugin is loaded in memory
50  and make them available for access anywhere in the plugin or layout module.
51  Ex .: Enum for data type, enum for object type, enum for mode type, enum for template type, etc.
52 
53  \ingroup layout
54 
55  \sa te::common::Singleton
56  */
58  {
60 
61  public:
62 
63  /*!
64  \brief Destructor
65  */
66  virtual ~Enums();
67 
68  /*!
69  \brief Change data type enumeration.
70 
71  \param type data type enumeration
72  */
73  virtual void setEnumDataType(EnumDataType* type);
74 
75  /*!
76  \brief Returns data type enumeration.
77 
78  \return data type enumeration
79  */
80  virtual EnumDataType* getEnumDataType();
81 
82  /*!
83  \brief Change graphic object (MVC component) and widget object (MVC widget) type enumeration.
84 
85  \param graphic object type enumeration
86  */
87  virtual void setEnumObjectType(EnumObjectType* type);
88 
89  /*!
90  \brief Returns graphic object (MVC component) and widget object (MVC widget) type enumeration.
91 
92  \return graphic object type enumeration
93  */
94  virtual EnumObjectType* getEnumObjectType();
95 
96  /*!
97  \brief Change grid style type enumeration.
98 
99  \param grid style type enumeration
100  */
101  virtual void setEnumGridStyleType(EnumGridStyleType* type);
102 
103  /*!
104  \brief Returns grid style type enumeration.
105 
106  \return grid style type enumeration
107  */
108  virtual EnumGridStyleType* getEnumGridStyleType();
109 
110  /*!
111  \brief Change line style type enumeration.
112 
113  \param line style type enumeration
114  */
115  virtual void setEnumLineStyleType(EnumLineStyleType* type);
116 
117  /*!
118  \brief Returns line style type enumeration.
119 
120  \return line style type enumeration
121  */
122  virtual EnumLineStyleType* getEnumLineStyleType();
123 
124  /*!
125  \brief Change mode type enumeration.
126 
127  \param mode type enumeration
128  */
129  virtual void setEnumModeType(EnumModeType* type);
130 
131  /*!
132  \brief Returns mode type enumeration.
133 
134  \return mode type enumeration
135  */
136  virtual EnumModeType* getEnumModeType();
137 
138  /*!
139  \brief Change template type enumeration.
140 
141  \param template type enumeration
142  */
143  virtual void setEnumTemplateType(EnumTemplateType* type);
144 
145  /*!
146  \brief Returns template type enumeration
147 
148  \return template type enumeration
149  */
150  virtual EnumTemplateType* getEnumTemplateType();
151 
152  protected:
153 
154  /*!
155  \brief Constructor
156  */
157  Enums();
158 
159  protected:
160 
161  EnumDataType* m_dataType; //!< data type enumeration
162  EnumObjectType* m_objType; //!< graphic object type enumeration
163  EnumGridStyleType* m_gridStyleType; //!< grid style type enumeration
164  EnumLineStyleType* m_lineStyleType; //!< line style type enumeration
165  EnumModeType* m_modeType; //!< mode type enumeration
166  EnumTemplateType* m_templateType; //!< template type enumeration
167 
168  private:
169 
170  /*!
171  \brief Copy constructor not allowed.
172 
173  \param rhs The right-hand-side copy that would be used to copy from.
174  */
175  Enums(const Enums& rhs);
176 
177  /*!
178  \brief Assignment operator not allowed.
179 
180  \param rhs The right-hand-side copy that would be used to copy from.
181 
182  \return A reference to this object.
183  */
184  Enums& operator=(const Enums& rhs);
185  };
186  }
187 }
188 
189 #endif
Class to represent a graphic object (MVC component) and widget object (MVC widget) type enumeration...
Class to represent a template type enumeration. Ex.: json, etc.
#define TELAYOUTEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:99
EnumObjectType * m_objType
graphic object type enumeration
Definition: Enums.h:162
EnumDataType * m_dataType
data type enumeration
Definition: Enums.h:161
Singleton class responsible for keeping active objects of Enum while the plugin is loaded in memory a...
Definition: Enums.h:57
Class to represent a grid style type enumeration. Ex.: continuous, cross, etc.
Class to represent a mode type enumeration. Ex.: select, pan, create text, etc. The type of mode is u...
Definition: EnumModeType.h:50
Class to represent a data type enumeration. Ex.: int, double, bool, te::color::RGBAColor (color)...
Definition: EnumDataType.h:48
Class to represent a grid style type enumeration. Ex.: continuous, cross, etc.
EnumModeType * m_modeType
mode type enumeration
Definition: Enums.h:165
Class to represent a mode type enumeration. Ex.: select, pan, create text, etc. The type of mode is u...
Class to represent a data type enumeration. Ex.: int, double, bool, te::color::RGBAColor (color)...
Class that represents the value of an enumeration. An enumeration is made of "1..n" objects EnumType...
Class to represent a line style type enumeration. Ex.: solid, dash, dot, etc.
Class to represent a scale type enumeration. Ex.: hollow scale bar, etc.
EnumTemplateType * m_templateType
template type enumeration
Definition: Enums.h:166
EnumLineStyleType * m_lineStyleType
line style type enumeration
Definition: Enums.h:164
Class to represent a graphic object (MVC component) and widget object (MVC widget) type enumeration...
EnumGridStyleType * m_gridStyleType
grid style type enumeration
Definition: Enums.h:163
Class to represent a line style type enumeration. Ex.: solid, dash, dot, etc.
Template support for singleton pattern.
Definition: Singleton.h:100