fw4spl
Bundle.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/Bundle.hpp"
8 
9 #include "fwRuntime/EmptyPlugin.hpp"
10 #include "fwRuntime/ExecutableFactory.hpp"
11 #include "fwRuntime/Extension.hpp"
12 #include "fwRuntime/ExtensionPoint.hpp"
13 #include "fwRuntime/IExecutable.hpp"
14 #include "fwRuntime/io/BundleDescriptorReader.hpp"
15 #include "fwRuntime/profile/Initializer.hpp"
16 #include "fwRuntime/profile/Profile.hpp"
17 #include "fwRuntime/profile/Stopper.hpp"
18 #include "fwRuntime/Runtime.hpp"
19 #include "fwRuntime/utils/GenericExecutableFactory.hpp"
20 
21 #include <fwCore/base.hpp>
22 
23 #include <algorithm>
24 #include <cassert>
25 #include <exception>
26 #include <memory>
27 
28 namespace fwRuntime
29 {
30 
31 //------------------------------------------------------------------------------
32 
33 SPTR( Bundle ) Bundle::m_loadingBundle;
34 
35 //------------------------------------------------------------------------------
36 
37 SPTR( Bundle ) Bundle::getLoadingBundle()
38 {
39  return m_loadingBundle;
40 }
41 
42 //------------------------------------------------------------------------------
43 
44 Bundle::Bundle( const ::boost::filesystem::path& location,
45  const std::string& id,
46  const std::string& version ) :
47  Bundle(location, id, version, "")
48 {
49 }
50 
51 //------------------------------------------------------------------------------
52 
53 Bundle::Bundle( const ::boost::filesystem::path& location,
54  const std::string& id,
55  const std::string& version,
56  const std::string& c ) :
57  m_resourcesLocation( location.lexically_normal() ),
58  m_identifier( id ),
59  m_version( version ),
60  m_class( c )
61 {
62  // Post-condition.
63  SLM_ASSERT( "Invalid bundle location.", m_resourcesLocation.is_complete() == true );
64 
65  // Starting from FW4SPL 13.0, the plugin.xml is now likely to be separated from the libraries in the build/install
66  std::string strLocation = location.string();
67  const std::string strRCPrefix = BUNDLE_RC_PREFIX;
68  const auto itBundle = strLocation.find(strRCPrefix);
69  if(itBundle != std::string::npos)
70  {
71  strLocation.replace(itBundle, strRCPrefix.length(), std::string(BUNDLE_LIB_PREFIX));
72  }
73  m_libraryLocation = ::boost::filesystem::path(strLocation);
74 }
75 
76 //------------------------------------------------------------------------------
77 
79 {
80  m_executableFactories.insert( factory );
81 }
82 
83 //------------------------------------------------------------------------------
84 
86 {
87  return m_executableFactories.begin();
88 }
89 
90 //------------------------------------------------------------------------------
91 
93 {
94  return m_executableFactories.end();
95 }
96 
97 //------------------------------------------------------------------------------
98 
99 SPTR( ExecutableFactory ) Bundle::findExecutableFactory( const std::string& type ) const
100 {
101  std::shared_ptr<ExecutableFactory> resExecutableFactory;
102  for(const ExecutableFactoryContainer::value_type& factory : m_executableFactories)
103  {
104  if(factory->getType() == type)
105  {
106  resExecutableFactory = factory;
107  break;
108  }
109  }
110  return resExecutableFactory;
111 }
112 
113 //------------------------------------------------------------------------------
114 
116 {
117  m_extensions.insert( extension );
118 }
119 
120 //------------------------------------------------------------------------------
121 
122 bool Bundle::hasExtension(const std::string& identifier) const
123 {
124  bool hasExtension = false;
125  for(const ExtensionContainer::value_type& extension : m_extensions)
126  {
127  if(extension->getIdentifier() == identifier)
128  {
129  hasExtension = true;
130  break;
131  }
132  }
133  return hasExtension;
134 }
135 
136 //------------------------------------------------------------------------------
137 
138 void Bundle::setEnableExtension(const std::string& identifier, const bool enable)
139 {
140  for(const ExtensionContainer::value_type& extension : m_extensions)
141  {
142  if(extension->getIdentifier() == identifier)
143  {
144  extension->setEnable(enable);
145  break; // The identifier is unique => can break the loop
146  }
147  }
148 }
149 
150 //------------------------------------------------------------------------------
151 
153 {
154  return m_extensions.begin();
155 }
156 
157 //------------------------------------------------------------------------------
158 
160 {
161  return m_extensions.end();
162 }
163 //------------------------------------------------------------------------------
164 
166 {
167  m_extensionPoints.insert( extensionPoint );
168 }
169 
170 //------------------------------------------------------------------------------
171 
172 SPTR( ExtensionPoint ) Bundle::findExtensionPoint( const std::string& identifier ) const
173 {
174  std::shared_ptr<ExtensionPoint> resExtensionPoint;
175  for(const ExtensionPointContainer::value_type& extensionPoint : m_extensionPoints)
176  {
177  if(extensionPoint->getIdentifier() == identifier && extensionPoint->isEnable())
178  {
179  resExtensionPoint = extensionPoint;
180  break;
181  }
182  }
183  return resExtensionPoint;
184 }
185 
186 //------------------------------------------------------------------------------
187 
188 bool Bundle::hasExtensionPoint(const std::string& identifier) const
189 {
190  bool hasExtensionPoint = false;
191  for(const ExtensionPointContainer::value_type& extensionPoint : m_extensionPoints)
192  {
193  if(extensionPoint->getIdentifier() == identifier)
194  {
195  hasExtensionPoint = true;
196  break;
197  }
198  }
199  return hasExtensionPoint;
200 }
201 
202 //------------------------------------------------------------------------------
203 
204 void Bundle::setEnableExtensionPoint(const std::string& identifier, const bool enable)
205 {
206  for(const ExtensionPointContainer::value_type& extensionPoint : m_extensionPoints)
207  {
208  if(extensionPoint->getIdentifier() == identifier)
209  {
210  extensionPoint->setEnable(enable);
211  break;
212  }
213  }
214 }
215 
216 //------------------------------------------------------------------------------
217 
219 {
220  return m_extensionPoints.begin();
221 }
222 
223 //------------------------------------------------------------------------------
224 
226 {
227  return m_extensionPoints.end();
228 }
229 
230 //------------------------------------------------------------------------------
231 
233 {
234  library->setBundle(this);
235  m_libraries.insert(library);
236 }
237 
238 //------------------------------------------------------------------------------
239 
241 {
242  return m_libraries.begin();
243 }
244 
245 //------------------------------------------------------------------------------
246 
248 {
249  return m_libraries.end();
250 }
251 
252 //------------------------------------------------------------------------------
253 
254 void Bundle::addRequirement(const std::string& requirement)
255 {
256  m_requirements.insert(requirement);
257 }
258 
259 //------------------------------------------------------------------------------
260 
261 const std::string Bundle::getClass() const
262 {
263  return m_class;
264 }
265 
266 //------------------------------------------------------------------------------
267 
268 const std::string& Bundle::getIdentifier() const
269 {
270  return m_identifier;
271 }
272 
273 //------------------------------------------------------------------------------
274 
275 const ::boost::filesystem::path& Bundle::getLibraryLocation() const
276 {
277  return m_libraryLocation;
278 }
279 
280 //------------------------------------------------------------------------------
281 
282 const ::boost::filesystem::path& Bundle::getResourcesLocation() const
283 {
284  return m_resourcesLocation;
285 }
286 
287 //------------------------------------------------------------------------------
288 
290 {
291  return m_plugin;
292 }
293 
294 //------------------------------------------------------------------------------
295 
297 {
298  return m_version;
299 }
300 
301 //------------------------------------------------------------------------------
302 
303 void Bundle::loadLibraries()
304 {
305  // Ensure the bundle is enabled.
306  if( m_enable == false )
307  {
308  throw RuntimeException( getBundleStr(m_identifier, m_version) + ": bundle is not enabled." );
309  }
310 
311  // Pre-condition
312  SLM_ASSERT("Bundle is already loaded", m_loadingBundle == 0 );
313 
314  SLM_TRACE( "Loading " + this->getIdentifier() + s_VERSION_DELIMITER + this->getVersion().string() + " library...");
315 
316  // References the current bundle as the loading bundle.
317  m_loadingBundle = shared_from_this();
318 
319  // Loads all libraries.
320  for(const LibraryContainer::value_type& library : m_libraries)
321  {
322  if(library->isLoaded() == false)
323  {
324  try
325  {
326  library->load();
327  }
328  catch( std::exception& e )
329  {
330  std::string message;
331 
332  message += "Unable to load module ";
333  message += library->getPath().string();
334  message += ". ";
335  message += e.what();
336 
337  SLM_ERROR(message);
338  m_loadingBundle.reset();
339 
340  throw RuntimeException( message );
341  }
342  }
343  }
344 
345  // Unreferences the current bundle from the loading bundle.
346  m_loadingBundle.reset();
347 
348  // Post-condition
349  assert( m_loadingBundle == 0 );
350  SLM_TRACE("Library " + getBundleStr(m_identifier, m_version) + " loaded");
351 }
352 
353 //------------------------------------------------------------------------------
354 
355 void Bundle::loadRequirements()
356 {
357  try
358  {
359  Runtime* rntm(Runtime::getDefault());
360  RequirementContainer::const_iterator iter;
361  for(const RequirementContainer::value_type& requirement : m_requirements)
362  {
363  SPTR( Bundle ) bundle( rntm->findEnabledBundle(requirement) );
364 
365  // Ensure that a bundle has been retrieved.
366  if( bundle == 0 )
367  {
368  throw RuntimeException( requirement + ": required bundle not found or not enabled." );
369  }
370  // Starts the bundle (loads its libraries and requirements bundle).
371  if ( !bundle->isStarted() )
372  {
373  bundle->start();
374  }
375  }
376  }
377  catch( const std::exception& e )
378  {
379  std::string message;
380 
381  message += "Bundle " + getBundleStr(m_identifier, m_version) + " was not able to load requirements. ";
382  message += e.what();
383  throw RuntimeException( message );
384  }
385 }
386 
387 //------------------------------------------------------------------------------
388 
390 {
391  SLM_ASSERT("Bundle " + getBundleStr(m_identifier, m_version) + " already started.",
392  !m_started );
393  if( m_enable == false )
394  {
395  throw RuntimeException( getBundleStr(m_identifier, m_version) + ": bundle is not enabled." );
396  }
397 
398  if( m_plugin == nullptr )
399  {
400  loadRequirements();
401  loadLibraries();
402  try
403  {
404  startPlugin();
405  SLM_TRACE(getBundleStr(m_identifier, m_version) + " Started");
406  }
407  catch( std::exception& e )
408  {
409  throw RuntimeException( getBundleStr(m_identifier, m_version) +
410  ": start plugin error (after load requirement) :" + e.what() );
411  }
412  }
413 }
414 
415 //------------------------------------------------------------------------------
416 
417 void Bundle::startPlugin()
418 {
419  SLM_ASSERT("Bundle " + getBundleStr(m_identifier, m_version) + " plugin is already started.",
420  !m_started );
421  // Retrieves the type of the plugin.
422  const std::string pluginType( getClass() );
423 
424  // According to the presence of a class or not, build and empty
425  // plugin or attempt to instantiate a user defined plugin.
426  SPTR( IPlugin ) plugin;
427 
428  if( pluginType.empty() )
429  {
430  plugin = SPTR( IPlugin )( new EmptyPlugin() );
431  }
432  else
433  {
434  Runtime* rntm( Runtime::getDefault() );
435  SPTR( IExecutable ) executable( rntm->createExecutableInstance(pluginType) );
436 
437  plugin = std::dynamic_pointer_cast< IPlugin >( executable );
438  }
439 
440  // Ensures that a plugin has been created.
441  if( plugin == 0 )
442  {
443  throw RuntimeException( getBundleStr(m_identifier, m_version) + ": unable to create a plugin instance." );
444  }
445 
446  SLM_TRACE("Starting " + getBundleStr(m_identifier, m_version) + " Bundle's plugin.");
447  // Stores and start the plugin.
448  try
449  {
450  SLM_TRACE("Register stopper for " + getBundleStr(m_identifier, m_version) + " Bundle's plugin.");
451  ::fwRuntime::profile::getCurrentProfile()->add(
453  m_plugin = plugin;
454  plugin->start();
455  ::fwRuntime::profile::getCurrentProfile()->add(
457  m_started = true;
458  }
459  catch( std::exception& e )
460  {
461  throw RuntimeException( getBundleStr(m_identifier, m_version) + ": start plugin error : " + e.what() );
462  }
463 }
464 
465 //------------------------------------------------------------------------------
466 
468 {
469  SLM_ASSERT("Bundle "+ getBundleStr(m_identifier, m_version) + " not started.", m_started );
470  SLM_ASSERT(getBundleStr(m_identifier, m_version) + " : m_plugin not an intance.", m_plugin != nullptr );
471  SLM_ASSERT("Bundle " + getBundleStr(m_identifier, m_version) + " not uninitialized.", !m_initialized );
472 
473  SLM_TRACE("Stopping " + getBundleStr(m_identifier, m_version) + " Bundle's plugin.");
474  try
475  {
476  m_plugin->stop();
477  m_started = false;
478  OSLM_TRACE(getBundleStr(m_identifier, m_version) << " Stopped");
479  }
480  catch( std::exception& e )
481  {
482  throw RuntimeException( getBundleStr(m_identifier, m_version) + ": stop plugin error : " + e.what() );
483  }
484 
485  ::fwRuntime::Runtime::getDefault()->unregisterBundle(this->shared_from_this());
486 
487  //Unloads all libraries.
488 // LibraryContainer::iterator curEntry;
489 // LibraryContainer::iterator endEntry = m_libraries.end();
490 // for(curEntry = m_libraries.begin(); curEntry != endEntry; ++curEntry)
491 // {
492 // std::shared_ptr<dl::Library> library(*curEntry);
493 // if(library->isLoaded() == true )
494 // {
495 // library->unload();
496 // }
497 // }
498 }
499 
500 //------------------------------------------------------------------------------
502 {
503  SLM_ASSERT("Bundle '" + getBundleStr(m_identifier, m_version) + "' not started.", m_started );
504  SLM_ASSERT("Bundle '"+ getBundleStr(m_identifier, m_version) + "' already initialized.", !m_initialized );
505  try
506  {
507  m_initialized = true;
508  SLM_TRACE("Initializing " + getBundleStr(m_identifier, m_version) + " ...");
509  m_plugin->initialize();
510  SLM_TRACE(" " + getBundleStr(m_identifier, m_version) + " Initialized");
511  }
512  catch( std::exception& e )
513  {
514  throw RuntimeException( getBundleStr(m_identifier, m_version) + ": initialize plugin error : " + e.what() );
515  }
516 }
517 
518 //------------------------------------------------------------------------------
519 
520 void Bundle::uninitialize()
521 {
522  SLM_ASSERT("Bundle '"+ getBundleStr(m_identifier, m_version) + "' has not been started.",
523  m_plugin != nullptr);
524  SLM_ASSERT("Bundle '"+ getBundleStr(m_identifier, m_version) + "' not initialized.", m_initialized );
525  try
526  {
527  SLM_TRACE("Uninitializing " + this->getIdentifier() + " ...");
528  m_plugin->uninitialize();
529  m_initialized = false;
530  SLM_TRACE(" " + this->getIdentifier() + " Uninitialized");
531  }
532  catch( std::exception& e )
533  {
534  throw RuntimeException( getBundleStr(m_identifier, m_version) + ": initialize plugin error : " + e.what() );
535  }
536 }
537 
538 //------------------------------------------------------------------------------
539 
540 bool Bundle::isEnable() const
541 {
542  return m_enable;
543 }
544 
545 //------------------------------------------------------------------------------
546 
547 void Bundle::setEnable( const bool state )
548 {
549  m_enable = state;
550 }
551 
552 //------------------------------------------------------------------------------
553 
554 void Bundle::addParameter( const std::string& identifier, const std::string& value )
555 {
556  m_parameters[identifier] = value;
557 }
558 
559 //------------------------------------------------------------------------------
560 
561 const std::string Bundle::getParameterValue( const std::string& identifier ) const
562 {
563  ParameterContainer::const_iterator found = m_parameters.find(identifier);
564 
565  return (found != m_parameters.end()) ? found->second : std::string();
566 }
567 
568 //------------------------------------------------------------------------------
569 
570 bool Bundle::hasParameter( const std::string& identifier ) const
571 {
572  return (m_parameters.find(identifier) != m_parameters.end());
573 }
574 
575 //------------------------------------------------------------------------------
576 
577 std::string fwRuntime::Bundle::getBundleStr(const std::string& identifier, const fwRuntime::Version& version)
578 {
579  return identifier + s_VERSION_DELIMITER + version.string();
580 }
581 
582 //------------------------------------------------------------------------------
583 
584 void Bundle::operator= ( const Bundle& )
585 {
586 }
587 
588 //------------------------------------------------------------------------------
589 
590 } // namespace fwRuntime
static FWRUNTIME_API Runtime * getDefault()
Retrieves the default runtime instance.
Definition: Runtime.cpp:286
Defines the runtime class.
Definition: Runtime.hpp:37
#define SPTR(_cls_)
FWRUNTIME_API void setEnable(const bool state)
Changes the enable state of the bundle.
Definition: Bundle.cpp:547
void addExtension(std::shared_ptr< Extension > extension)
Adds the specified extension to the bundle.
Definition: Bundle.cpp:115
FWRUNTIME_API void initialize()
Initialize the bundle.
Definition: Bundle.cpp:501
FWRUNTIME_API void addParameter(const std::string &identifier, const std::string &value)
Adds a parameter to the bundle.
Definition: Bundle.cpp:554
FWRUNTIME_API bool isEnable() const
Tells if the bundle is enable.
Definition: Bundle.cpp:540
Defines the extension class.
Definition: Extension.hpp:30
Defines the abstract executable factory class.
FWRUNTIME_API void start()
Starts the bundle.
Definition: Bundle.cpp:389
FWRUNTIME_API void setEnableExtension(const std::string &identifier, const bool enable)
Search a specific extension in the bundle to enable or disable it.
Definition: Bundle.cpp:138
Defines the runtime exception class.
FWRUNTIME_API std::shared_ptr< Bundle > findEnabledBundle(const std::string &identifier, const Version &version=Version()) const
Retrieves the enabled bundle for the specified idenfier.
Definition: Runtime.cpp:270
FWRUNTIME_API void addExecutableFactory(std::shared_ptr< ExecutableFactory > factory)
Adds an executable factory instance to the bundle.
Definition: Bundle.cpp:78
FWRUNTIME_API ExtensionConstIterator extensionsBegin() const
Retrieves the iterator on the first item in the managed extension collection.
Definition: Bundle.cpp:152
FWRUNTIME_API IExecutable * createExecutableInstance(const std::string &type)
Create an instance of the given executable object type.
Definition: Runtime.cpp:329
FWRUNTIME_API ExecutableFactoryConstIterator executableFactoriesBegin() const
Retrieves the iterator on the first item in the managed executable factory collection.
Definition: Bundle.cpp:85
STL namespace.
Defines the extension point class.
Defines the base executable interface.An executable object is an instance created by an extension poi...
Definition: IExecutable.hpp:41
FWRUNTIME_API void unregisterBundle(std::shared_ptr< Bundle > bundle)
Unregister a bundle instance to the runtime system.
Definition: Runtime.cpp:96
#define OSLM_TRACE(message)
Definition: spyLog.hpp:230
Contains fwAtomsFilter::factory utilities.
FWRUNTIME_API const Version & getVersion() const
Retrieves the version of the bundle.
Definition: Bundle.cpp:296
FWRUNTIME_API ExecutableFactoryConstIterator executableFactoriesEnd() const
Retrieves the iterator on the ending item in the managed executable factory collection.
Definition: Bundle.cpp:92
FWRUNTIME_API std::shared_ptr< ExecutableFactory > findExecutableFactory(const std::string &type) const
Retrieves the executable factory instance for the specified type name.
Definition: Bundle.cpp:99
FWRUNTIME_API void stop()
Tells if the bundle is enable.
Definition: Bundle.cpp:467
FWRUNTIME_API LibraryConstIterator librariesBegin() const
Retrieves the iterator on the first item in the managed dynamic library collection.
Definition: Bundle.cpp:240
The namespace fwRuntime contains classes to manage bundle, configuration element, extension point in ...
#define SLM_ERROR(message)
Definition: spyLog.hpp:272
FWRUNTIME_API const std::string getClass() const
Retrieves the class representing the bundle executable part.
Definition: Bundle.cpp:261
FWRUNTIME_API ExtensionPointConstIterator extensionPointsEnd() const
Retrieves the iterator on the ending item in the managed extension point collection.
Definition: Bundle.cpp:225
FWRUNTIME_API bool hasParameter(const std::string &name) const
Tells if a parameter exists.
Definition: Bundle.cpp:570
FWRUNTIME_API std::shared_ptr< ExtensionPoint > findExtensionPoint(const std::string &identifier) const
Retrieves the extension point for the given identifier.
Definition: Bundle.cpp:172
LibraryContainer::const_iterator LibraryConstIterator
Defines the dynamic library container.
Definition: Bundle.hpp:72
Implements a default plugin for bundles that don&#39;t provide a fwRuntime::IPlugin interface implementat...
Definition: EmptyPlugin.hpp:32
FWRUNTIME_API ExtensionConstIterator extensionsEnd() const
Retrieves the iterator on the ending item in the managed extension collection.
Definition: Bundle.cpp:159
Defines the plugin interface.
Definition: IPlugin.hpp:29
FWRUNTIME_APIconst::boost::filesystem::path & getResourcesLocation() const
Retrieves the bundle location.
Definition: Bundle.cpp:282
Defines the module class.This class is only a bridge to a native module implementor.
Definition: Library.hpp:30
FWRUNTIME_API const std::string & getIdentifier() const
Retrieves the bundle identifier.
Definition: Bundle.cpp:268
#define SLM_ASSERT(message, cond)
work like &#39;assert&#39; from &#39;cassert&#39;, with in addition a message logged by spylog (with FATAL loglevel) ...
Definition: spyLog.hpp:308
ExtensionContainer::const_iterator ExtensionConstIterator
Defines the extension container.
Definition: Bundle.hpp:62
FWRUNTIME_API void addRequirement(const std::string &requirement)
Adds a requirement to the bundle.
Definition: Bundle.cpp:254
ExecutableFactoryContainer::const_iterator ExecutableFactoryConstIterator
Defines the executable.
Definition: Bundle.hpp:56
FWRUNTIME_API ExtensionPointConstIterator extensionPointsBegin() const
Retrieves the iterator on the first item in the managed extension point collection.
Definition: Bundle.cpp:218
#define SLM_TRACE(message)
Definition: spyLog.hpp:228
FWRUNTIME_API bool hasExtensionPoint(const std::string &identifier) const
Tells if a specific extension point exists.
Definition: Bundle.cpp:188
void setBundle(const ::fwRuntime::Bundle *bundle) noexcept
Sets the bundle the library is attached to.
Definition: Library.hpp:113
FWRUNTIME_API void setEnableExtensionPoint(const std::string &identifier, const bool enable)
Search a specific extension point in the bundle to enable or disable it.
Definition: Bundle.cpp:204
Defines the bundle class.
Definition: Bundle.hpp:45
FWRUNTIME_API const std::string getParameterValue(const std::string &identifier) const
Retrieves the value of the given parameter.
Definition: Bundle.cpp:561
FWRUNTIME_API void addLibrary(std::shared_ptr< dl::Library > library)
Adds the specified library to the bundle.
Definition: Bundle.cpp:232
Bundle(const ::boost::filesystem::path &location, const std::string &id, const std::string &version)
Constructor.
Definition: Bundle.cpp:44
Holds version information for libraries and bundles.
ExtensionPointContainer::const_iterator ExtensionPointConstIterator
Defines the extension point.
Definition: Bundle.hpp:67
FWRUNTIME_API const std::string string() const
String converter.
FWRUNTIME_API bool hasExtension(const std::string &identifier) const
Tells if an specific extension exists.
Definition: Bundle.cpp:122
Starts a given bundle.
Definition: Initializer.hpp:26
FWRUNTIME_APIconst::boost::filesystem::path & getLibraryLocation() const
Retrieves the bundle location.
Definition: Bundle.cpp:275
void addExtensionPoint(std::shared_ptr< ExtensionPoint > extension)
Adds the specified extension point to the bundle.
Definition: Bundle.cpp:165
FWRUNTIME_API std::shared_ptr< IPlugin > getPlugin() const
Retrieves the plugin instance for the specified bundle identifier.
Definition: Bundle.cpp:289
Stops a given bundle.
Definition: Stopper.hpp:26
FWRUNTIME_API LibraryConstIterator librariesEnd() const
Retrieves the iterator on the ending item in the managed dynamic library collection.
Definition: Bundle.cpp:247