Module.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/ogr/Module.h
22 
23  \brief The TerraLib OGR driver is a plugin.
24 */
25 
26 #ifndef __TERRALIB_OGR_INTERNAL_MODULE_H
27 #define __TERRALIB_OGR_INTERNAL_MODULE_H
28 
29 // TerraLib
30 #include "../plugin/Plugin.h"
31 #include "Config.h"
32 
33 namespace te
34 {
35  namespace ogr
36  {
37  /*!
38  \class Module
39 
40  \brief The TerraLib OGR driver is a plugin.
41  */
42  class Module : public te::plugin::Plugin
43  {
44  public:
45 
46  /*!
47  \brief Plugin constructor.
48 
49  \param pInfo Basic information provided to initialize this module through the plugin API.
50  */
51  Module(const te::plugin::PluginInfo& pluginInfo);
52 
53  /*! \brief Destructor. */
54  ~Module();
55 
56  /*!
57  \brief It initializes all TerraLib OGR driver support.
58 
59  The initialization includes:
60  <ul>
61  <li>Multilanguage support</li>
62  <li>OGRRegisterAll</li>
63  </ul>
64 
65  \exception Exception It may throws an exception.
66 
67  \note This function must be called at least once in your program. The best
68  place to call it is inside the main routine of your application.
69 
70  \warning Not thread safe!
71 
72  \warning If this method throws an exception we recommend you to
73  quit the program, don't try to resume it because you can have intermittent errors!
74  */
75  void startup();
76 
77  /*!
78  \brief It finalizes all TerraLib OGR driver support.
79 
80  \exception Exception It may throws an exception.
81 
82  \note This function must be called in your program at least the same times you have called
83  initialize. In general this must be the last call to TerraLib API. As in case of the initialize method,
84  this routine can be called at the end of the main routine of your application.
85 
86  \warning Not thread safe!
87 
88  \warning If this method throws an exception we recommend you to
89  quit the program, don't try to resume it because you can have intermittent errors!
90  */
91  void shutdown();
92  };
93  } // end namespace ogr
94 } // end namespace te
95 
97 
98 #endif // __TERRALIB_OGR_INTERNAL_MODULE_H
99 
~Module()
Destructor.
#define TEOGREXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:79
PLUGIN_CALL_BACK_DECLARATION(TEADOEXPORT)
The TerraLib OGR driver is a plugin.
Definition: Module.h:42
URI C++ Library.
A base class for plugin types.
Definition: Plugin.h:50
Module(const te::plugin::PluginInfo &pluginInfo)
Plugin constructor.
Configuration flags for the OGR Driver Implementation of TerraLib.
The basic information about a plugin.
Definition: PluginInfo.h:61
void startup()
It initializes all TerraLib OGR driver support.
void shutdown()
It finalizes all TerraLib OGR driver support.