All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Utils.h
Go to the documentation of this file.
1 /* Copyright (C) 2001-2009 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 Utils.h
22 
23  \brief Utility functions for ST module.
24 */
25 
26 #ifndef __TERRALIB_ST_INTERNAL_UTILS_H
27 #define __TERRALIB_ST_INTERNAL_UTILS_H
28 
29 // TerraLib
30 #include "../datatype/Enums.h"
31 #include "../datatype/DateTime.h"
32 
33 // ST
34 #include "Config.h"
35 
36 // STL
37 #include <map>
38 #include <vector>
39 
40 // Boost
41 #include <boost/shared_ptr.hpp>
42 
43 // Forward declarations
44 namespace te { namespace dt { class AbstractData; class Property; } }
45 namespace te { namespace da { class DataSetType; } }
46 
47 namespace te
48 {
49  namespace st
50  {
51  // Forward declarations
52  class TimeSeries;
53  class ObservationDataSetInfo;
54  class ObservationDataSetType;
55  class TrajectoryDataSetInfo;
56  class TrajectoryDataSetType;
57  class TimeSeriesDataSetInfo;
58  class TimeSeriesDataSetType;
59  //class CoverageSeriesDataSetInfo;
60  //class CoverageSeriesDataSetType;
61 
62  /*!
63  \brief An auxiliary function that transform ObservationDataSetInfo into ObservationDataSetType.
64  */
65  TESTEXPORT ObservationDataSetType GetType(const ObservationDataSetInfo& info);
66 
67  /*!
68  \brief An auxiliary function that transform TimeSeriesDataSetInfo into TimeSeriesDataSetType.
69  */
70  TESTEXPORT TimeSeriesDataSetType GetType(const TimeSeriesDataSetInfo& info);
71 
72  /*!
73  \brief An auxiliary function that transform TrajectoryDataSetInfo into TrajectoryDataSetType.
74  */
75  TESTEXPORT TrajectoryDataSetType GetType(const TrajectoryDataSetInfo& info);
76 
77  /*!
78  \brief An auxiliary struct to compare two datetime shared pointers
79  */
81  {
82  bool operator()(const te::dt::DateTimeShrPtr& t1, const te::dt::DateTimeShrPtr& t2) const
83  {
84  return t1->operator<(*t2);
85  }
86  };
87 
88  } // end namespace st
89 } // end namespace te
90 
91 #endif // __TERRALIB_ST_INTERNAL_UTILS_H
#define TESTEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:90
boost::shared_ptr< DateTime > DateTimeShrPtr
Definition: DateTime.h:126
TESTEXPORT ObservationDataSetType GetType(const ObservationDataSetInfo &info)
An auxiliary function that transform ObservationDataSetInfo into ObservationDataSetType.
Definition: Utils.cpp:46
bool operator()(const te::dt::DateTimeShrPtr &t1, const te::dt::DateTimeShrPtr &t2) const
Definition: Utils.h:82
An auxiliary struct to compare two datetime shared pointers.
Definition: Utils.h:80