fw4spl
SrcLib/core/fwRuntime/include/fwRuntime/Plugin.hpp
1 /* ***** BEGIN LICENSE BLOCK *****
2  * FW4SPL - Copyright (C) IRCAD, 2009-2018.
3  * Distributed under the terms of the GNU Lesser General Public License (LGPL) as
4  * published by the Free Software Foundation.
5  * ****** END LICENSE BLOCK ****** */
6 
7 #pragma once
8 
9 #include "fwRuntime/config.hpp"
10 #include "fwRuntime/IPlugin.hpp"
11 
12 namespace fwRuntime
13 {
14 
21 struct FWRUNTIME_CLASS_API Plugin : public IPlugin
22 {
23  public:
24  FWRUNTIME_API std::shared_ptr<Bundle> getBundle() const noexcept override;
25  FWRUNTIME_API virtual void setInitializationData(const SPTR(ConfigurationElement)configuration) noexcept
26  override;
27 
28  protected:
29  FWRUNTIME_API void setBundle( std::shared_ptr<Bundle> bundle) noexcept override;
30 
31  private:
35  std::weak_ptr<Bundle> m_bundle;
36 };
37 
38 } // namespace fwRuntime
#define SPTR(_cls_)
Defines the configuration element class.
The namespace fwRuntime contains classes to manage bundle, configuration element, extension point in ...
Provides a default plugin implementation.
Defines the plugin interface.
Definition: IPlugin.hpp:29