All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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 Module.h
22 
23  \brief This TerraLib Xerces driver as a plugin.
24 */
25 
26 #ifndef __TERRALIB_XERCES_INTERNAL_MODULE_H
27 #define __TERRALIB_XERCES_INTERNAL_MODULE_H
28 
29 // TerraLib
30 #include "../plugin/CppPlugin.h"
31 #include "Config.h"
32 
33 namespace te
34 {
35  namespace xerces
36  {
37  /*!
38  \class Module
39 
40  \brief The TerraLib Xerces module is a plugin.
41  */
43  {
44  public:
45 
46  /*!
47  \brief Plugin constructor.
48 
49  \param pInfo Basic information needed to initialize the plugin.
50  */
51  Module(const te::plugin::PluginInfo& pInfo);
52 
53  /* \brief Destructor. */
54  ~Module();
55 
56  /*!
57  \brief This method will be called by TerraLib to startup some plugin's functionality.
58 
59  \exception Exception It throws an exception if the plugin can not be started.
60  */
61  void startup();
62 
63  /*!
64  \brief This method will be called by TerraLib to shutdown plugin's functionality.
65 
66  \exception Exception It throws an exception if the plugin can not be shutdown.
67  */
68  void shutdown();
69 
70  /*! \brief It initializes all TerraLib XERCES driver support.
71 
72  The initialization includes:
73  <ul>
74  <li>Multilanguage support;</li>
75  <li>Logger initialization.</li>
76  </ul>
77 
78  \note This function must be called once in your program. I think that the best
79  place to call it, is inside the main routine of your application.
80 
81  \warning Not thread safe!
82  */
83  static void initialize();
84 
85  /*! \brief It finalizes all TerraLib XERCES driver support.
86 
87  \note This function must be called once in your program. This must
88  be the last call to TerraLib XERCES driver. As the Initialize function, this
89  can be called at the end of the main routine of your application.
90 
91  \warning Not thread safe!
92  */
93  static void finalize();
94 
95  public:
96 
97  static bool m_initialized;
98  };
99  } // end namespace xerces
100 } // end namespace te
101 
103 
104 #endif // __TERRALIB_XERCES_INTERNAL_MODULE_H
105 
PLUGIN_CALL_BACK_DECLARATION(TEADOEXPORT)
void startup()
This method will be called by TerraLib to startup some plugin's functionality.
Definition: Module.cpp:50
An abstract interface for Plugins written in C++.
Definition: CppPlugin.h:48
void shutdown()
This method will be called by TerraLib to shutdown plugin's functionality.
Definition: Module.cpp:80
Module(const te::plugin::PluginInfo &pInfo)
Plugin constructor.
Definition: Module.cpp:41
static void initialize()
It initializes all TerraLib XERCES driver support.
static bool m_initialized
Definition: Module.h:97
#define TEXERCESEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:83
The TerraLib Xerces module is a plugin.
Definition: Module.h:42
The basic information about a plugin.
Definition: PluginInfo.h:61
static void finalize()
It finalizes all TerraLib XERCES driver support.