Platform.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 Platform.h
22 
23  \brief A utility class to initialize and terminate TerraLib GRIB driver support.
24 */
25 
26 #ifndef __TERRALIB_GRIB_INTERNAL_PLATFORM_H
27 #define __TERRALIB_GRIB_INTERNAL_PLATFORM_H
28 
29 // TerraLib
30 #include "../plugin/CppPlugin.h"
31 #include "Config.h"
32 
33 // STL
34 #include <string>
35 
36 namespace te
37 {
38  namespace grib
39  {
40  /*!
41  \class Platform
42 
43  \brief A utility class to initialize and terminate TerraLib GRIB driver support.
44  */
46  {
47  public:
48 
49  /** @name Initializer Methods
50  * Constructor/Destructor.
51  */
52  //@{
53 
54  /*! \brief It creates a new C++ module. */
55  Platform(const te::plugin::PluginInfo& pluginInfo);
56 
57  /*! \brief destructor. */
58  ~Platform();
59 
60  //@}
61 
62  /** @name Re-Implmentation from Plugin Interface
63  * Re-Implementation from Plugin Interface.
64  */
65  //@{
66 
67  /*!
68  \brief This method will be called by TerraLib to startup some plugin's functionality.
69 
70  \exception Exception It throws an exception if the plugin can not be started.
71  */
72  void startup();
73 
74  /*!
75  \brief This method will be called by TerraLib to shutdown plugin's functionality.
76 
77  \exception Exception It throws an exception if the plugin can not be shutdown.
78  */
79  void shutdown();
80 
81  //@}
82 
83  /** @name Static Initializer Methods
84  * Methods that can be used to initialize the GRIB module.
85  */
86  //@{
87 
88  /*! \brief It initializes all TerraLib GRIB driver support.
89 
90  The initialization includes:
91  <ul>
92  <li>Multilanguage support;</li>
93  <li>Logger initialization.</li>
94  </ul>
95 
96  \note This function must be called once in your program. I think that the best
97  place to call it, is inside the main routine of your application.
98 
99  \warning Not thread safe!
100  */
101  static void initialize();
102 
103  /*! \brief It finalizes all TerraLib GRIB driver support.
104 
105  \note This function must be called once in your program. This must
106  be the last call to TerraLib GRIB driver. As the Initialize function, this
107  can be called at the end of the main routine of your application.
108 
109  \warning Not thread safe!
110  */
111  static void finalize();
112 
113  //@}
114 
115  public:
116 
117  static bool sm_gribInitialized; //!< A flag that indicates if the GRIB driver is initialized or not.
118  };
119  } // end namespace grib
120 } // end namespace te
121 
123 
124 #endif // __TERRALIB_GRIB_INTERNAL_PLATFORM_H
125 
A utility class to initialize and terminate TerraLib GRIB driver support.
Definition: Platform.h:45
An abstract interface for Plugins written in C++.
Definition: CppPlugin.h:48
URI C++ Library.
Configuration flags for GRIB.
PLUGIN_CALL_BACK_DECLARATION(TEGRIBEXPORT)
#define TEGRIBEXPORT
You can use this macro in order to export/import classes and functions from this module.
Definition: Config.h:110
static bool sm_gribInitialized
A flag that indicates if the GRIB driver is initialized or not.
Definition: Platform.h:117
The basic information about a plugin.
Definition: PluginInfo.h:61