All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Functions.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/idl/Functions.h
22 
23 \brief IDL module functions.
24 */
25 
26 #ifndef __TERRALIB_IDL_INTERNAL_FUNCTIONS_H
27 #define __TERRALIB_IDL_INTERNAL_FUNCTIONS_H
28 
29 #include "Config.h"
30 
31 #include <boost/shared_ptr.hpp>
32 
33 #include <terralib/raster/Raster.h>
34 
35 #include <stdio.h>
36 
37 #include <idl_export.h>
38 
39 namespace te
40 {
41  namespace idl
42  {
43  /*!
44  \brief Convert IDL data types to Terralib data types.
45 
46  \param idlType IDL data type.
47 
48  \return Terralib data type.
49 
50  \sa terralib/datetype/Enums.h for more details.
51  */
52  int idl2TerralibType( const UCHAR& idlType );
53 
54  /*!
55  \brief Convert Terralib data types to IDL data types.
56 
57  \param idlType IDL data type.
58 
59  \return IDL data type.
60 
61  \sa terralib/datetype/Enums.h for more details.
62  */
63  UCHAR terralib2IdlType( const int& tlType );
64 
65  /*!
66  \brief A dummy function for internal use.
67  \details It does nothing
68  */
69  inline void dummyFunction( void* ) {};
70 
71  /*!
72  \brief Delete an array of elements.
73  */
74  inline void deleteArray( void* arrayPtr )
75  {
76  delete[] (unsigned char*)arrayPtr;
77  };
78 
79  /*!
80  \brief Load the required terralib modules.
81  */
82  void loadTerralibModules();
83 
84  bool createRasterFromIdlArray( IDL_VPTR idlValuePointer, const bool takeBufferOwnership,
85  boost::shared_ptr< te::rst::Raster >& outRasterPtr );
86 
87 
88  }; // namespace idl
89 }; // namespace te
90 
91 #endif // __TERRALIB_IDL_INTERNAL_FUNCTIONS_H
void dummyFunction(void *)
A dummy function for internal use.
Definition: Functions.h:69
void deleteArray(void *arrayPtr)
Delete an array of elements.
Definition: Functions.h:74
Configuration flags for the IDL module of TerraLib.
An abstract class for raster data strucutures.
void loadTerralibModules()
Load the required terralib modules.
Definition: Functions.cpp:192
bool createRasterFromIdlArray(IDL_VPTR idlValuePointer, const bool takeBufferOwnership, boost::shared_ptr< te::rst::Raster > &outRasterPtr)
Definition: Functions.cpp:224
UCHAR terralib2IdlType(const int &tlType)
Convert Terralib data types to IDL data types.
Definition: Functions.cpp:115
int idl2TerralibType(const UCHAR &idlType)
Convert IDL data types to Terralib data types.
Definition: Functions.cpp:38