fw4spl
SConfigController.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 "fwServices/SConfigController.hpp"
8 
9 #include <fwServices/macros.hpp>
10 
11 #include <boost/make_unique.hpp>
12 
13 namespace fwServices
14 {
15 
16 //------------------------------------------------------------------------------
17 
18 fwServicesRegisterMacro( ::fwServices::IController, ::fwServices::SConfigController );
19 
20 //------------------------------------------------------------------------------
21 
23 {
24  m_configLauncher = ::boost::make_unique< ::fwServices::helper::ConfigLauncher>();
25 }
26 
27 //------------------------------------------------------------------------------
28 
30 {
31 }
32 
33 //------------------------------------------------------------------------------
34 
36 {
37  m_configLauncher->startConfig(this->getSptr());
38 }
39 
40 //------------------------------------------------------------------------------
41 
43 {
44  m_configLauncher->stopConfig();
45 }
46 
47 //------------------------------------------------------------------------------
48 
50 {
51  m_configLauncher->stopConfig();
52  m_configLauncher->startConfig(this->getSptr());
53 }
54 
55 //------------------------------------------------------------------------------
56 
58 {
59  m_configLauncher->parseConfig(this->getConfigTree(), this->getSptr());
60 }
61 
62 //------------------------------------------------------------------------------
63 
65 {
66 }
67 
68 //------------------------------------------------------------------------------
69 
70 void SConfigController::info( std::ostream& )
71 {
72 }
73 
74 //------------------------------------------------------------------------------
75 
76 }
Namespace fwServices is dedicated to (mimic) the dynamic affectation of methods to (pure data) object...
FWSERVICES_API SConfigController() noexcept
Constructor. Does nothing.
virtual void configuring() override
Declare the configuration to associate with an operator type and a view config.
This interface defines control service API. Does nothing particularly, can be considered as a default...
Definition: IController.hpp:23
virtual void updating() override
Does nothing.
virtual FWSERVICES_API ~SConfigController() noexcept
Destructor. Does nothing.
virtual void starting() override
Starts the config.
This service starts/stops a template configuration.
virtual void stopping() override
Stops the config.
virtual void info(std::ostream &_sstream) override
Overrides.
virtual void swapping() override
Swaps the config.
FWSERVICES_API ConfigType getConfigTree() const
Return the configuration, in an boost property tree.
Definition: IService.cpp:247