Loading...
Searching...
No Matches
AbstractPlugin.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2008 National Institute For Space Research (INPE) - Brazil.
3
4 This file is part of the TerraLib - a Framework for building GIS enabled applications.
5
6 TerraLib is free software: you can redistribute it and/or modify
7 it under the terms of the GNU Lesser General Public License as published by
8 the Free Software Foundation, either version 3 of the License,
9 or (at your option) any later version.
10
11 TerraLib is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU Lesser General Public License for more details.
15
16 You should have received a copy of the GNU Lesser General Public License
17 along with TerraLib. See COPYING. If not, write to
18 TerraLib Team at <terralib-team@terralib.org>.
19 */
20
21/*!
22 \file terralib/core/plugin/AbstractPlugin.h
23
24 \brief The base class for plugins in TerraLib.
25
26 \author Gilberto Ribeiro de Queiroz
27 \author Matheus Cavassan Zaglia
28 */
29
30#ifndef __TERRALIB_CORE_PLUGIN_ABSTRACTPLUGIN_H__
31#define __TERRALIB_CORE_PLUGIN_ABSTRACTPLUGIN_H__
32
33// TerraLib
34#include "../Config.h"
35#include "Exception.h"
36#include "PluginInfo.h"
37
38namespace te
39{
40 namespace core
41 {
42
43 /*!
44 \class AbstractPlugin
45
46 \brief The base class for plugins in TerraLib.
47 */
49 {
50 public:
51
52 /*! \brief Default constructor. */
54
55 /*! \brief Virtual destructor. */
56 virtual ~AbstractPlugin() = default;
57
58 /*! \brief Plugin information. */
59 virtual const PluginInfo& info() const = 0;
60
61 /*! \brief Tells if the plugin has been started. */
62 virtual bool initialized() const = 0;
63
64 /*!
65 \brief This method will be called by applications to startup some plugin's functionality.
66
67 \exception PluginStartupException It may throws an exception.
68 */
69 virtual void startup() = 0;
70
71 /*!
72 \brief This method will be called by applicatons to shutdown plugin's functionality.
73
74 \exception PluginShutdownException It may throws an exception.
75 */
76 virtual void shutdown() = 0;
77
78 private:
79
80// no copy allowed
83 };
84
85 } // end namespace core
86} // end namespace te
87
88#endif // __TERRALIB_CORE_PLUGIN_ABSTRACTPLUGIN_H__
The basic information about a plugin.
The base class for plugins in TerraLib.
virtual const PluginInfo & info() const =0
Plugin information.
virtual ~AbstractPlugin()=default
Virtual destructor.
virtual bool initialized() const =0
Tells if the plugin has been started.
virtual void startup()=0
This method will be called by applications to startup some plugin's functionality.
virtual void shutdown()=0
This method will be called by applicatons to shutdown plugin's functionality.
AbstractPlugin(const AbstractPlugin &)
AbstractPlugin()
Default constructor.
AbstractPlugin & operator=(const AbstractPlugin &)
TerraLib.
Basic information about a plugin.
Definition: PluginInfo.h:64
An exception class for the XML module.