fw4spl
SrcLib/core/fwRuntime/src/Plugin.cpp
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 #include "fwRuntime/Plugin.hpp"
8 
9 #include "fwRuntime/ConfigurationElement.hpp"
10 
11 namespace fwRuntime
12 {
13 
14 //------------------------------------------------------------------------------
15 
16 std::shared_ptr<Bundle> Plugin::getBundle() const noexcept
17 {
18  return m_bundle.lock();
19 }
20 
21 //------------------------------------------------------------------------------
22 
23 void Plugin::setInitializationData(const ConfigurationElement::sptr) noexcept
24 {
25 }
26 
27 //------------------------------------------------------------------------------
28 
29 void Plugin::setBundle( std::shared_ptr<Bundle> bundle) noexcept
30 {
31  m_bundle = std::weak_ptr<Bundle>(bundle);
32 }
33 
34 //------------------------------------------------------------------------------
35 
36 } // namespace fwRuntime
virtual FWRUNTIME_API void setInitializationData(const std::shared_ptr< ConfigurationElement >configuration) noexcept override
Initializes the executable instance with the specified configuration element.
The namespace fwRuntime contains classes to manage bundle, configuration element, extension point in ...
FWRUNTIME_API void setBundle(std::shared_ptr< Bundle > bundle) noexcept override
Updates the bundle the executable originates from.
FWRUNTIME_API std::shared_ptr< Bundle > getBundle() const noexcept override
Retrieves the bundle the executable originates from.