fw4spl
Bundles/core/servicesReg/src/servicesReg/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 "servicesReg/Plugin.hpp"
8 
9 #include <fwRuntime/utils/GenericExecutableFactoryRegistrar.hpp>
10 
11 #include <fwServices/registry/ActiveWorkers.hpp>
12 #include <fwServices/registry/AppConfig.hpp>
13 #include <fwServices/registry/AppConfigParameters.hpp>
14 #include <fwServices/registry/ServiceConfig.hpp>
15 #include <fwServices/registry/ServiceFactory.hpp>
16 
17 #include <fwThread/Pool.hpp>
18 
19 namespace servicesReg
20 {
21 
22 static ::fwRuntime::utils::GenericExecutableFactoryRegistrar<Plugin> registrar("::servicesReg::Plugin");
23 
24 //-----------------------------------------------------------------------------
25 
26 Plugin::~Plugin() noexcept
27 {
28 }
29 
30 //-----------------------------------------------------------------------------
31 
33 {
34  ::fwServices::registry::ServiceFactory::getDefault()->parseBundleInformation();
35  ::fwServices::registry::ServiceConfig::getDefault()->parseBundleInformation();
36  ::fwServices::registry::AppConfig::getDefault()->parseBundleInformation();
38 }
39 
40 //-----------------------------------------------------------------------------
41 
43 {
44 }
45 
46 //-----------------------------------------------------------------------------
47 
49 {
50  // Clear all service configs
52 
53  // Clear all app configuration
55 
56  // Clear all app configuration parameters
58 
59  // Clear all service factories
61 
62  // Clear all active Workers
64 }
65 
66 //-----------------------------------------------------------------------------
67 
68 void Plugin::stop() noexcept
69 {
70 }
71 
72 //-----------------------------------------------------------------------------
73 
74 } // namespace servicesReg
SERVICESREG_API void stop() noexcept
Overrides stop method. Do nothing.
SERVICESREG_API void initialize()
Overrides initialize method.
static FWSERVICES_API ActiveWorkers::sptr getDefault()
Returns an instance of ActiveWorkers.
static FWSERVICES_API AppConfigParameters::sptr getDefault()
Return the default global instance of AppConfigParameters.
SERVICESREG_API ~Plugin() noexcept
Destructor. Do nothing.
SERVICESREG_API void uninitialize()
Overrides uninitialize method.
The namespace servicesReg (registration service) allows to load all the service managment registry...
static FWSERVICES_API AppConfig::sptr getDefault()
Return an instance of AppConfig.
Definition: AppConfig.cpp:37
static FWSERVICES_API ServiceFactory::sptr getDefault()
Return the unique Instance, create it if required at first access.
static FWSERVICES_API ServiceConfig::sptr getDefault()
Return the default global instance of ServiceConfig.
SERVICESREG_API void start()
Overrides start method. Service declarations (services declared in fwServices libraries )...