Utils.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 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 ObservationDataSetInfo;
53  class ObservationDataSetType;
54 
55  /*!
56  \brief An auxiliary function that transform ObservationDataSetInfo into ObservationDataSetType.
57  */
58  TESTEXPORT ObservationDataSetType GetType(const ObservationDataSetInfo& info);
59 
60  /*!
61  \brief An auxiliary struct to compare two datetime shared pointers
62  */
64  {
65  bool operator()(const te::dt::DateTimeShrPtr& t1, const te::dt::DateTimeShrPtr& t2) const
66  {
67  return t1->operator<(*t2);
68  }
69  };
70 
71  } // end namespace st
72 } // end namespace te
73 
74 #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:88
boost::shared_ptr< DateTime > DateTimeShrPtr
Definition: DateTime.h:126
bool operator()(const te::dt::DateTimeShrPtr &t1, const te::dt::DateTimeShrPtr &t2) const
Definition: Utils.h:65
URI C++ Library.
An auxiliary struct to compare two datetime shared pointers.
Definition: Utils.h:63
TESTEXPORT ObservationDataSetType GetType(const ObservationDataSetInfo &info)
An auxiliary function that transform ObservationDataSetInfo into ObservationDataSetType.