All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Enums.h
Go to the documentation of this file.
1 /* Copyright (C) 2008-2013 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/datatype/Enums.h
22 
23  \brief General enumerations for the data type module.
24 */
25 
26 #ifndef __TERRALIB_DATETYPE_INTERNAL_ENUMS_H
27 #define __TERRALIB_DATETYPE_INTERNAL_ENUMS_H
28 
29 namespace te
30 {
31  namespace dt
32  {
33  /*!
34  \enum DateTimeType
35 
36  \brief The subtype of date and time type.
37  */
39  {
40  DATE, /*!< Date data type. */
41  DATE_PERIOD, /*!< Date period data type. */
42  DATE_DURATION, /*!< Date duration data type. */
43  TIME_DURATION, /*!< Time period data type. */
44  TIME_INSTANT, /*!< Time instant data type (both date and local time). */
45  TIME_PERIOD, /*!< Time period data type (both date and local time). */
46  TIME_INSTANT_TZ, /*!< Time instant with time zone data type (both date and time with time zone). */
47  TIME_PERIOD_TZ, /*!< Time period with time zone data type (both date and time with time zone). */
48  ORDINAL_INSTANT, /*!< Ordinal time instant. */
49  ORDINAL_PERIOD /*!< Ordinal time period. */
50  };
51 
52  /*!
53  \enum DateTimeResolution
54 
55  \brief The date and time resolution.
56  */
58  {
59  YEAR, /*!< Year. */
60  MONTH, /*!< Month of the year. */
61  DAY, /*!< Day of the month. */
62  HOUR, /*!< Hour of the day. */
63  MINUTE, /*!< Minute of the hour. */
64  SECOND, /*!< Second of the minute. */
65  WEEK, /*!< Week of the year. */
66  DAYOFWEEK, /*!< Day of week: from 1 (Monday) to 7 (Sunday). */
67  DAYOFYEAR, /*!< Day of year. */
68  UNKNOWN /*!< Unknown time resolution. */
69  };
70 
71  /*!
72  \enum TemporalRelation
73 
74  \brief Temporal relations between date and time (Source: Allen, 1991).
75  */
77  {
79  BEFORE = 1, /*!< */
80  AFTER = 2, /*!< */
81  DURING = 4, /*!< */
82  EQUALS = 8, /*!< */
83  MEETS = 16, /*!< */
84  OVERLAPS = 32, /*!< */
85  STARTS = 64, /*!< */
86  FINISHES = 128
87  };
88 
89  /*!
90  \enum BasicRelation
91 
92  \brief Relations between simple attribute values.
93  */
95  {
97  LESS = 1, /*!< */
98  MORE = 2, /*!< */
99  EQUAL = 4 /*!< */
100  };
101 
102  /*!
103  \enum StringType
104 
105  \brief The subtype of string property.
106  */
108  {
109  FIXED_STRING, /*!< For fixed-length strings (blank padded if needed). */
110  VAR_STRING, /*!< For variable length string with a limited size. */
111  STRING /*!< For variable unlimited length string. */
112  };
113 
114  /*!
115  \brief An anonymous union for all the basic data types supported by TerraLib.
116 
117  \warning If you change this list, please, update all code dependencies (for example: LAST_DATATYPE_CODE).
118  */
119  enum
120  {
121  UNKNOWN_TYPE = 0, /*!< Used when the data type is unknown. */
122  VOID_TYPE = 1, /*!< For void data types. */
123  BIT_TYPE = 2, /*!< Used for 1 bit data types. */
124  CHAR_TYPE = 3, /*!< Character data type (1 byte long). */
125  UCHAR_TYPE = 4, /*!< Unsigned character data type (1 byte long). */
126  INT16_TYPE = 5, /*!< Integer number data type (2 bytes long). */
127  UINT16_TYPE = 6, /*!< Unsigned Integer number data type (2 bytes long). */
128  INT32_TYPE = 7, /*!< Signed Integer number data type (4 bytes long). */
129  UINT32_TYPE = 8, /*!< Unsigned Integer number data type (4 bytes long). */
130  INT64_TYPE = 9, /*!< Signed Integer number data type (8 bytes long). */
131  UINT64_TYPE = 10, /*!< Unsigned Integer number data type (8 bytes long). */
132  BOOLEAN_TYPE = 11, /*!< Boolean type (true or false). */
133  FLOAT_TYPE = 12, /*!< Float number (32 bits) data type. */
134  DOUBLE_TYPE = 13, /*!< Double number (64 bits) data type. */
135  NUMERIC_TYPE = 14, /*!< Arbitrary precision data type: Numeric(p, q). */
136  STRING_TYPE = 15, /*!< String data type. */
137  BYTE_ARRAY_TYPE = 16, /*!< Binary data (BLOB). */
138  GEOMETRY_TYPE = 17, /*!< Geometry data type. */
139  DATETIME_TYPE = 18, /*!< Date and time data type. */
140  ARRAY_TYPE = 19, /*!< Array of homogeneous elements. */
141  COMPOSITE_TYPE = 20, /*!< Composed type. */
142  DATASET_TYPE = 21, /*!< When the type is a DataSet. */
143  RASTER_TYPE = 22, /*!< When the type is a Raster. */
144  CINT16_TYPE = 23, /*!< Complex signed integer number data type (2 + 2 bytes long). */
145  CINT32_TYPE = 24, /*!< Complex signed integer number data type (4 + 4 bytes long). */
146  CFLOAT_TYPE = 25, /*!< Complex float number (32 + 32 bits) data type. */
147  CDOUBLE_TYPE = 26, /*!< Complex double number (64 + 64 bits) data type. */
148  XML_TYPE = 27, /*!< XML data type. */
149  DATASETITEM_TYPE = 28, /*!< When the type is a DataSetItem. */
150  POLYMORPHIC_TYPE = 29, /*!< When the type is polymorphic. */
151  R4BITS_TYPE = 30, /*!< When the type is a raster with 4 bits. */
152  R2BITS_TYPE = 31, /*!< When the type is a raster with 2 bits. */
153  R1BIT_TYPE = 32 /*!< When the type is a raster with 1 bit. */
154  };
155 
156  /*! \brief An anonymous union that marks the last common data type supported by TerraLib. */
157  enum
158  {
160  };
161 
162  } // end namespace dt
163 } // end namespace te
164 
165 #endif // __TERRALIB_DATETYPE_INTERNAL_ENUMS_H
166 
DateTimeResolution
The date and time resolution.
Definition: Enums.h:57
BasicRelation
Relations between simple attribute values.
Definition: Enums.h:94
TemporalRelation
Temporal relations between date and time (Source: Allen, 1991).
Definition: Enums.h:76
DateTimeType
The subtype of date and time type.
Definition: Enums.h:38
StringType
The subtype of string property.
Definition: Enums.h:107