Loading...
Searching...
No Matches
CppPluginProxy.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/CppPluginProxy.h
23
24 \brief A proxy class for C++ plugins.
25
26 \author Gilberto Ribeiro de Queiroz
27 \author Matheus Cavassan Zaglia
28 */
29
30#ifndef __TERRALIB_CORE_PLUGIN_CPPPLUGINPROXY_H__
31#define __TERRALIB_CORE_PLUGIN_CPPPLUGINPROXY_H__
32
33// TerraLib
34#include "AbstractPlugin.h"
35
36// STL
37#include <memory>
38
39namespace te
40{
41 namespace core
42 {
43
44// Forward declaration
45 class CppPlugin;
46 class Library;
47
48 /*!
49 \class CppPluginProxy
50
51 \brief A proxy class for C++ plugins.
52 */
54 {
55 public:
56
57 /*! \brief Constructor. */
58 CppPluginProxy(const std::shared_ptr<Library>& slib,
59 std::unique_ptr<CppPlugin> real_plugin);
60
61 /*! \brief Destructor. */
63
64 /*!
65 \brief It returns the PluginInfo of the CppPlugin
66
67 \return The CppPlugin information
68 */
69 const PluginInfo& info() const;
70
71 /*!
72 \brief It returns true or false if the CppPlugin was initialized
73
74 \return The current state of the CppPlugin
75 */
76 bool initialized() const;
77
78 /*!
79 \brief It starts the CppPlugin
80
81 \exception PluginStartupException It may throws an exception if the CppPlugin cannot be started.
82 */
83 void startup();
84
85 /*!
86 \brief It shuts down the CppPlugin
87
88 \exception PluginShutdownException It may throws an exception if the CppPlugin cannot be shutdown.
89 */
90 void shutdown();
91
92 private:
93
94 struct Impl;
95
96 Impl* m_pimpl;
97 };
98
99 } // end namespace core
100} // end namespace te
101
102#endif // __TERRALIB_CORE_PLUGIN_CPPPLUGINPROXY_H__
The base class for plugins in TerraLib.
The base class for plugins in TerraLib.
A proxy class for C++ plugins.
void startup()
It starts the CppPlugin.
void shutdown()
It shuts down the CppPlugin.
~CppPluginProxy()
Destructor.
bool initialized() const
It returns true or false if the CppPlugin was initialized.
const PluginInfo & info() const
It returns the PluginInfo of the CppPlugin.
CppPluginProxy(const std::shared_ptr< Library > &slib, std::unique_ptr< CppPlugin > real_plugin)
Constructor.
TerraLib.
Basic information about a plugin.
Definition: PluginInfo.h:64