HelloWorld.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 HelloWorld.h
22 
23  \brief Example...
24  */
25 
26 #ifndef __TERRALIB_EXAMPLE_CPPPLUGIN_INTERNAL_HELLOWORLD_H
27 #define __TERRALIB_EXAMPLE_CPPPLUGIN_INTERNAL_HELLOWORLD_H
28 
29 #ifdef WIN32
30  #pragma warning( disable : 4251 )
31 //#pragma warning( disable : 4275 )
32 
33  #ifdef TECPPPLUGINHELLOWORLDDLL
34  #define TECPPPLUGINHELLOWORLDEXPORT __declspec(dllexport) // export DLL information
35  #else
36  #define TECPPPLUGINHELLOWORLDEXPORT __declspec(dllimport) // import DLL information
37  #endif
38 #else
39  #define TECPPPLUGINHELLOWORLDEXPORT
40 #endif
41 
42 // TerraLib
43 #include <terralib/plugin/CppPlugin.h>
44 
45 /*!
46  \class HelloWorldPlugin
47 
48  \brief Example....
49 
50  \sa CppPlugin, Plugin, PluginManager
51  */
52 class /*TECPPPLUGINHELLOWORLDEXPORT*/ HelloWorldPlugin : public te::plugin::CppPlugin
53 {
54  public:
55 
56  /** @name Initializer Methods
57  * Methods related to instantiation and destruction.
58  */
59  //@{
60 
61  /*! \brief It creates a new C++ plugin. */
62  HelloWorldPlugin(const te::plugin::PluginInfo& pluginInfo);
63 
64  /*! \brief destructor. */
66 
67  //@}
68 
69  /** @name Re-Implmentation from Plugin Interface
70  * Re-Implmentation from Plugin Interface.
71  */
72  //@{
73 
74  /*!
75  \brief This method will be called by TerraLib to startup some plugin's functionality.
76 
77  \exception Exception It throws and exception if the plugin can not be started.
78  */
79  void startup();
80 
81  /*!
82  \brief This method will be called by TerraLib to shutdown plugin's functionality.
83 
84  \exception Exception It throws and exception if the plugin can not be shutdown.
85  */
86  void shutdown();
87 
88  //@}
89 };
90 
92 
93 #endif // __TERRALIB_EXAMPLE_CPPPLUGIN_INTERNAL_HELLOWORLD_H
void startup()
This method will be called by TerraLib to startup some plugin&#39;s functionality.
Definition: HelloWorld.cpp:38
#define TECPPPLUGINHELLOWORLDEXPORT
Definition: HelloWorld.h:39
An abstract interface for Plugins written in C++.
Example....
Definition: HelloWorld.h:52
HelloWorldPlugin(const te::plugin::PluginInfo &pluginInfo)
It creates a new C++ plugin.
Definition: HelloWorld.cpp:29
~HelloWorldPlugin()
destructor.
Definition: HelloWorld.cpp:34
The basic information about a plugin.
PLUGIN_CALL_BACK_DECLARATION(TECPPPLUGINHELLOWORLDEXPORT)
void shutdown()
This method will be called by TerraLib to shutdown plugin&#39;s functionality.
Definition: HelloWorld.cpp:42