DataTypeCapabilities.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/dataaccess/datasource/DataTypeCapabilities.h
22 
23  \brief A class that represents the supported data types of a specific data source.
24 */
25 
26 #ifndef __TERRALIB_DATAACCESS_INTERNAL_DATATYPECAPABILITIES_H
27 #define __TERRALIB_DATAACCESS_INTERNAL_DATATYPECAPABILITIES_H
28 
29 // TerraLib
30 #include "../../datatype/Enums.h"
31 #include "../Config.h"
32 
33 // STL
34 #include <map>
35 
36 namespace te
37 {
38  namespace da
39  {
40  /*!
41  \class DataTypeCapabilities
42 
43  \brief A class that represents the supported data types of a specific data source.
44  */
46  {
47  public:
48 
49  /*! \brief Constructor. */
51 
52  /*! \brief Destructor. */
54 
55  public:
56 
57  bool supportsBit() const;
58 
59  void setSupportBit(const bool& support);
60 
61  bool supportsChar() const;
62 
63  void setSupportChar(const bool& support);
64 
65  bool supportsUChar() const;
66 
67  void setSupportUChar(const bool& support);
68 
69  bool supportsInt16() const;
70 
71  void setSupportInt16(const bool& support);
72 
73  bool supportsUInt16() const;
74 
75  void setSupportUInt16(const bool& support);
76 
77  bool supportsInt32() const;
78 
79  void setSupportInt32(const bool& support);
80 
81  bool supportsUInt32() const;
82 
83  void setSupportUInt32(const bool& support);
84 
85  bool supportsInt64() const;
86 
87  void setSupportInt64(const bool& support);
88 
89  bool supportsUInt64() const;
90 
91  void setSupportUInt64(const bool& support);
92 
93  bool supportsBoolean() const;
94 
95  void setSupportBoolean(const bool& support);
96 
97  bool supportsFloat() const;
98 
99  void setSupportFloat(const bool& support);
100 
101  bool supportsDouble() const;
102 
103  void setSupportDouble(const bool& support);
104 
105  bool supportsNumeric() const;
106 
107  void setSupportNumeric(const bool& support);
108 
109  bool supportsString() const;
110 
111  void setSupportString(const bool& support);
112 
113  bool supportsByteArray() const;
114 
115  void setSupportByteArray(const bool& support);
116 
117  bool supportsGeometry() const;
118 
119  void setSupportGeometry(const bool& support);
120 
121  bool supportsDateTime() const;
122 
123  void setSupportDateTime(const bool& support);
124 
125  bool supportsArray() const;
126 
127  void setSupportArray(const bool& support);
128 
129  bool supportsComposite() const;
130 
131  void setSupportComposite(const bool& support);
132 
133  bool supportsRaster() const;
134 
135  void setSupportRaster(const bool& support);
136 
137  bool supportsDataset() const;
138 
139  void setSupportDataset(const bool& support);
140 
141  bool supportsXML() const;
142 
143  void setSupportXML(const bool& support);
144 
145  bool supportsCInt16() const;
146 
147  void setSupportCInt16(const bool& support);
148 
149  bool supportsCInt32() const;
150 
151  void setSupportCInt32(const bool& support);
152 
153  bool supportsCFloat() const;
154 
155  void setSupportCFloat(const bool& support);
156 
157  bool supportsCDouble() const;
158 
159  void setSupportCDouble(const bool& support);
160 
161  bool supportsPolymorphic() const;
162 
163  void setSupportPolymorphic(const bool& support);
164 
165  bool supports(const int& type) const;
166 
167  void setSupport(const int& type, const bool& support);
168 
169  void setSupportAll();
170 
171  void addHint(const int& type, const int& hint);
172 
173  int getHint(const int& type) const;
174 
175  private:
176 
177  std::map<int, bool> m_types; //!< A map that indicates the supported data types.
178  std::map<int, int> m_hints; //!< A map that indicates a type hint to a given type.
179  };
180 
181  } // end namespace da
182 } // end namespace te
183 
184 #endif // __TERRALIB_DATAACCESS_INTERNAL_DATATYPECAPABILITIES_H
dataTypeCapabilities setSupportUChar(false)
dataTypeCapabilities setSupportChar(false)
dataTypeCapabilities setSupportDataset(false)
dataTypeCapabilities setSupportUInt64(false)
dataTypeCapabilities setSupportUInt16(false)
std::map< int, int > m_hints
A map that indicates a type hint to a given type.
dataTypeCapabilities setSupportCDouble(false)
dataTypeCapabilities setSupportCInt16(false)
A class that represents the supported data types of a specific data source.
dataTypeCapabilities setSupportComposite(false)
URI C++ Library.
dataTypeCapabilities setSupportAll()
dataTypeCapabilities setSupportCFloat(false)
dataTypeCapabilities setSupportBit(false)
std::map< int, bool > m_types
A map that indicates the supported data types.
dataTypeCapabilities setSupportPolymorphic(false)
#define TEDATAACCESSEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:97
dataTypeCapabilities setSupportUInt32(false)
dataTypeCapabilities setSupportCInt32(false)