|
fw4spl
|
This class allows to register all the service configuration which has the point extension "::fwServices::registry::ServiceConfig". More...
#include <ServiceConfig.hpp>
Inheritance diagram for fwServices::registry::ServiceConfig:
Collaboration diagram for fwServices::registry::ServiceConfig:Public Member Functions | |
| virtual bool | isA (const std::string &type) const override |
| virtual FWSERVICES_API | ~ServiceConfig () |
| Destructor. | |
| FWSERVICES_API void | parseBundleInformation () |
| Parses bundle information to retrieve service declaration. More... | |
| FWSERVICES_API void | addServiceConfigInfo (const std::string &configId, const std::string &service, const std::string &desc,::fwRuntime::ConfigurationElement::csptr config) |
| Register a new service configuration. More... | |
| FWSERVICES_API::fwRuntime::ConfigurationElement::csptr | getServiceConfig (const std::string &configId, const std::string &serviceImpl="") const |
| Returns the configuration with the given id for the service with the given implementation. More... | |
| FWSERVICES_API const std::string & | getConfigDesc (const std::string &configId) const |
| Returns the description of the given configuration name. More... | |
| FWSERVICES_API std::vector< std::string > | getAllConfigForService (std::string serviceImpl, bool matchingOnly=false) const |
| Returns a vector containing the names of the available config for the service with the given implementation. More... | |
| FWSERVICES_API void | clearRegistry () |
| Clear the registry. More... | |
Public Member Functions inherited from fwCore::BaseObject | |
Static Public Member Functions | |
| static bool | isTypeOf (const std::string &type) |
| static FWSERVICES_API ServiceConfig::sptr | getDefault () |
| Return the default global instance of ServiceConfig. | |
Static Public Member Functions inherited from fwCore::BaseObject | |
| static bool | isTypeOf (const std::string &type) |
| static const std::string & | leafClassname () |
| return object's classname without its namespace, i.e. BaseObject | |
| static const std::string & | classname () |
| return object's classname without its namespace, i.e. BaseObject | |
Protected Types | |
| typedef std::map< std::string, ServiceConfigInfo::sptr > | Registry |
Protected Member Functions | |
| FWSERVICES_API | ServiceConfig () |
| Constructor. | |
Protected Attributes | |
| Registry | m_reg |
| Container of service information <configId, service config information> | |
| mutable::fwCore::mt::ReadWriteMutex | m_registryMutex |
| Used to protect the registry access. | |
Static Protected Attributes | |
| static const std::string | CONFIG_EXT_POINT = "::fwServices::registry::ServiceConfig" |
| static ServiceConfig::sptr | s_currentServiceConfig = ServiceConfig::New() |
| The global instance of the service config. | |
Friends | |
| template<class , class , class > | |
| class | ::fwTools::ClassFactory |
| class | ::fwTools::Factory |
Demangling methods | |
| virtual const std::string & | getLeafClassname () const override |
| return object's classname without its namespace, i.e. BaseObject | |
| virtual const std::string & | getClassname () const override |
| return full object's classname with its namespace, i.e. fwCore::BaseObject | |
| static const std::string & | leafClassname () |
| return object's classname without its namespace, i.e. BaseObject | |
| static const std::string & | classname () |
| return object's classname without its namespace, i.e. BaseObject | |
This class allows to register all the service configuration which has the point extension "::fwServices::registry::ServiceConfig".
Registry config like :
Definition at line 65 of file ServiceConfig.hpp.
| void fwServices::registry::ServiceConfig::addServiceConfigInfo | ( | const std::string & | configId, |
| const std::string & | service, | ||
| const std::string & | desc, | ||
| ::fwRuntime::ConfigurationElement::csptr | config | ||
| ) |
Register a new service configuration.
| configId | the identifier of the registered configuration. |
| service | the implementation of the service |
| desc | the description of the configuration |
| config | the registered config |
Definition at line 74 of file ServiceConfig.cpp.
References m_reg, m_registryMutex, OSLM_DEBUG, and SLM_ASSERT.
Referenced by parseBundleInformation().
Here is the caller graph for this function:| void fwServices::registry::ServiceConfig::clearRegistry | ( | ) |
Clear the registry.
Definition at line 105 of file ServiceConfig.cpp.
References m_reg, and m_registryMutex.
| std::vector< std::string > fwServices::registry::ServiceConfig::getAllConfigForService | ( | std::string | serviceImpl, |
| bool | matchingOnly = false |
||
| ) | const |
Returns a vector containing the names of the available config for the service with the given implementation.
Definition at line 138 of file ServiceConfig.cpp.
References m_reg, and m_registryMutex.
| const std::string & fwServices::registry::ServiceConfig::getConfigDesc | ( | const std::string & | configId | ) | const |
Returns the description of the given configuration name.
Definition at line 127 of file ServiceConfig.cpp.
References m_reg, m_registryMutex, and SLM_ASSERT.
| fwRuntime::ConfigurationElement::csptr fwServices::registry::ServiceConfig::getServiceConfig | ( | const std::string & | configId, |
| const std::string & | serviceImpl = "" |
||
| ) | const |
Returns the configuration with the given id for the service with the given implementation.
Definition at line 113 of file ServiceConfig.cpp.
References m_reg, m_registryMutex, and SLM_ASSERT.
| void fwServices::registry::ServiceConfig::parseBundleInformation | ( | ) |
Parses bundle information to retrieve service declaration.
Definition at line 37 of file ServiceConfig.cpp.
References addServiceConfigInfo(), and SLM_ASSERT.
Here is the call graph for this function: