fw4spl
Activater.hpp
1 /* ***** BEGIN LICENSE BLOCK *****
2  * FW4SPL - Copyright (C) IRCAD, 2009-2015.
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 #ifndef __FWRUNTIME_PROFILE_ACTIVATER_HPP__
8 #define __FWRUNTIME_PROFILE_ACTIVATER_HPP__
9 
10 #include <map>
11 #include <vector>
12 #include <string>
13 #include <boost/utility.hpp>
14 
15 #include "fwRuntime/config.hpp"
16 #include "fwRuntime/Version.hpp"
17 
18 
19 
20 namespace fwRuntime
21 {
22 
23 namespace profile
24 {
25 
26 
27 
34 class Activater : public boost::noncopyable
35 {
36 public:
37 
44  FWRUNTIME_API Activater( const std::string & identifier, const std::string & version );
45 
46 
53  FWRUNTIME_API void addParameter( const std::string & identifier, const std::string & value );
54 
60  FWRUNTIME_API void addDisableExtensionPoint( const std::string & identifier );
61 
67  FWRUNTIME_API void addDisableExtension( const std::string & identifier );
68 
74  void apply();
75 
76 
77 private:
78 
79  typedef std::map< std::string, std::string > ParameterContainer;
80  typedef std::vector< std::string > DisableExtensionPointContainer;
81  typedef std::vector< std::string > DisableExtensionContainer;
82 
83 
84  const std::string m_identifier;
85  const Version m_version;
86 
87  ParameterContainer m_parameters;
88  DisableExtensionPointContainer m_disableExtensionPoints;
89  DisableExtensionContainer m_disableExtensions;
90 
91 };
92 
93 
94 
95 } // namespace profile
96 
97 } // namespace fwRuntime
98 
99 
100 
101 #endif /*__FWRUNTIME_PROFILE_ACTIVATER_HPP__*/
Activates a given bundle with optional parameters.
Definition: Activater.hpp:34
void apply()
Applies the activater on the system.
Definition: Activater.cpp:60
FWRUNTIME_API void addParameter(const std::string &identifier, const std::string &value)
Adds a new parameter to the activater.
Definition: Activater.cpp:39
FWRUNTIME_API void addDisableExtensionPoint(const std::string &identifier)
Adds a new disable extension point to the activater.
Definition: Activater.cpp:46
The namespace fwRuntime contains classes to manage bundle, configuration element, extension point in ...
Holds version information for libraries and bundles.
FWRUNTIME_API void addDisableExtension(const std::string &identifier)
Adds a new disable extension to the activater.
Definition: Activater.cpp:53
FWRUNTIME_API Activater(const std::string &identifier, const std::string &version)
Constructor.
Definition: Activater.cpp:31