8 #pragma GCC visibility push(default) 12 #pragma GCC visibility pop 15 #include <fwCore/base.hpp> 17 #include "fwRuntime/Runtime.hpp" 18 #include "fwRuntime/Bundle.hpp" 19 #include "fwRuntime/ExtensionPoint.hpp" 20 #include "fwRuntime/Extension.hpp" 21 #include "fwRuntime/profile/Activater.hpp" 32 m_identifier( identifier ),
41 m_parameters[identifier] = value;
48 m_disableExtensionPoints.push_back(identifier);
55 m_disableExtensions.push_back(identifier);
63 SLM_FATAL_IF(
"Unable to activate Bundle " + m_identifier +
"-" + m_version.
string() +
". Not found.", bundle == 0);
65 bundle->setEnable(
true );
68 for( ParameterContainer::const_iterator i = m_parameters.begin();
69 i != m_parameters.end();
72 bundle->addParameter( i->first, i->second );
76 for( DisableExtensionPointContainer::const_iterator
id = m_disableExtensionPoints.begin();
77 id != m_disableExtensionPoints.end();
80 if( bundle->hasExtensionPoint(*
id) )
82 bundle->setEnableExtensionPoint( *
id,
false );
87 "Unable to disable Extension Point " << *
id <<
" defined in the Bundle " << m_identifier <<
93 for( DisableExtensionContainer::const_iterator
id = m_disableExtensions.begin();
94 id != m_disableExtensions.end();
97 if( bundle->hasExtension(*
id) )
99 bundle->setEnableExtension( *
id,
false );
104 "Unable to disable Extension " << *
id <<
" defined in the Bundle " << m_identifier <<
static FWRUNTIME_API Runtime * getDefault()
Retrieves the default runtime instance.
void apply()
Applies the activater on the system.
FWRUNTIME_API void addParameter(const std::string &identifier, const std::string &value)
Adds a new parameter to the activater.
FWRUNTIME_API void addDisableExtensionPoint(const std::string &identifier)
Adds a new disable extension point to the activater.
FWRUNTIME_API std::shared_ptr< Bundle > findBundle(const std::string &identifier, const Version &version=Version()) const
Retrieves the bundle for the specified idenfier.
The namespace fwRuntime contains classes to manage bundle, configuration element, extension point in ...
#define OSLM_ERROR(message)
#define SLM_FATAL_IF(message, cond)
FWRUNTIME_API void addDisableExtension(const std::string &identifier)
Adds a new disable extension to the activater.
FWRUNTIME_API const std::string string() const
String converter.
FWRUNTIME_API Activater(const std::string &identifier, const std::string &version)
Constructor.