|
fw4spl
|
This class allows to register all the configuration which has the point extension "::fwServices::registry::AppConfig". More...
#include <AppConfig.hpp>
Inheritance diagram for fwServices::registry::AppConfig:
Collaboration diagram for fwServices::registry::AppConfig:Public Types | |
| typedef std::map< std::string, std::string > | FieldAdaptorType |
| Associations of <pattern, value>. | |
Public Member Functions | |
| virtual bool | isA (const std::string &type) const override |
| virtual FWSERVICES_API | ~AppConfig () |
| Destructor. | |
| FWSERVICES_API void | parseBundleInformation () |
| Parses bundle information to retrieve configuration declaration. More... | |
| FWSERVICES_API void | parseBundleInformation (const std::vector< std::shared_ptr< ::fwRuntime::Extension > > &extensions) |
| Parses bundle information to retrieve configuration declaration. More... | |
| FWSERVICES_API void | addAppInfo (const std::string &configId, const std::string &group, const std::string &desc, const AppInfo::ParametersType ¶meters, const ::fwRuntime::ConfigurationElement::csptr &config, const std::string &bundleId, const std::string &bundleVersion) |
| Register a new config. More... | |
| FWSERVICES_API::fwRuntime::ConfigurationElement::csptr | getAdaptedTemplateConfig (const std::string &configId, const FieldAdaptorType replaceFields, bool autoPrefixId) const |
| Return the adapted config with the identifier configId. More... | |
| FWSERVICES_API::fwRuntime::ConfigurationElement::csptr | getAdaptedTemplateConfig (const std::string &configId,::fwData::Composite::csptr replaceFields, bool autoPrefixId) const |
| Return the adapted config with the identifier configId. More... | |
| FWSERVICES_API std::shared_ptr< ::fwRuntime::Bundle > | getBundle (const std::string &_configId) |
| Retrieves the bunble from the config id. More... | |
| FWSERVICES_API std::vector< std::string > | getAllConfigs () const |
| Return all configurations ( standard and template ) register in the registry. More... | |
| FWSERVICES_API std::vector< std::string > | getConfigsFromGroup (const std::string &group) const |
| Return all configurations with specified group. 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 std::string | getUniqueIdentifier (const std::string &serviceUid="") |
| Create an unique identifier. More... | |
| static FWSERVICES_API AppConfig::sptr | getDefault () |
| Return an instance of AppConfig. | |
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, AppInfo::sptr > | Registry |
Protected Member Functions | |
| FWSERVICES_API | AppConfig () |
| Constructor. | |
Protected Attributes | |
| Registry | m_reg |
| Container of <configId, AppConfig information> | |
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 configuration which has the point extension "::fwServices::registry::AppConfig".
Definition at line 36 of file AppConfig.hpp.
| void fwServices::registry::AppConfig::addAppInfo | ( | const std::string & | configId, |
| const std::string & | group, | ||
| const std::string & | desc, | ||
| const AppInfo::ParametersType & | parameters, | ||
| const ::fwRuntime::ConfigurationElement::csptr & | config, | ||
| const std::string & | bundleId, | ||
| const std::string & | bundleVersion | ||
| ) |
Register a new config.
| configId | the identifier of the registered config. |
| type | the type of the added config. It can be TEMPLATE, STANDARD or PARAMETERS. |
| group | the name of the group that owns the config. |
| desc | the config description. |
| parameters | the list of template parameters in the config. |
| config | the registered config. |
Definition at line 112 of file AppConfig.cpp.
References m_reg, SLM_ASSERT, and SLM_DEBUG.
Referenced by parseBundleInformation().
Here is the caller graph for this function:| void fwServices::registry::AppConfig::clearRegistry | ( | ) |
Clear the registry.
Definition at line 143 of file AppConfig.cpp.
References m_reg.
| fwRuntime::ConfigurationElement::csptr fwServices::registry::AppConfig::getAdaptedTemplateConfig | ( | const std::string & | configId, |
| const FieldAdaptorType | replaceFields, | ||
| bool | autoPrefixId | ||
| ) | const |
Return the adapted config with the identifier configId.
| configId | the identifier of the requested config. |
| replaceFields | associations between the value and the pattern to replace in the config. |
Definition at line 151 of file AppConfig.cpp.
References getUniqueIdentifier(), m_reg, and SLM_ASSERT.
Referenced by getAdaptedTemplateConfig().
Here is the call graph for this function:
Here is the caller graph for this function:| fwRuntime::ConfigurationElement::csptr fwServices::registry::AppConfig::getAdaptedTemplateConfig | ( | const std::string & | configId, |
| ::fwData::Composite::csptr | replaceFields, | ||
| bool | autoPrefixId | ||
| ) | const |
Return the adapted config with the identifier configId.
| configId | the identifier of the requested config. |
| replaceFields | composite of association between the value and the pattern to replace in the config. |
Definition at line 201 of file AppConfig.cpp.
References getAdaptedTemplateConfig().
Here is the call graph for this function:| std::vector< std::string > fwServices::registry::AppConfig::getAllConfigs | ( | ) | const |
Return all configurations ( standard and template ) register in the registry.
Definition at line 226 of file AppConfig.cpp.
References m_reg.
| std::shared_ptr<::fwRuntime::Bundle > fwServices::registry::AppConfig::getBundle | ( | const std::string & | _configId | ) |
Retrieves the bunble from the config id.
| configId | the config identifier |
Definition at line 212 of file AppConfig.cpp.
References m_reg, and SLM_ASSERT.
| std::vector< std::string > fwServices::registry::AppConfig::getConfigsFromGroup | ( | const std::string & | group | ) | const |
Return all configurations with specified group.
Definition at line 239 of file AppConfig.cpp.
References m_reg.
|
static |
Create an unique identifier.
Definition at line 269 of file AppConfig.cpp.
Referenced by getAdaptedTemplateConfig(), guiQt::editor::DynamicView::launchTab(), fwServices::helper::ConfigLauncher::startConfig(), uiMeasurement::action::LoadLandmark::stopping(), uiMeasurement::action::SaveLandmark::stopping(), guiQt::editor::SDynamicView::swapping(), uiMedDataQt::SSeriesViewer::updating(), guiQt::editor::SActivityView::updating(), and activities::action::SActivityLauncher::updating().
Here is the caller graph for this function:| void fwServices::registry::AppConfig::parseBundleInformation | ( | ) |
Parses bundle information to retrieve configuration declaration.
Definition at line 50 of file AppConfig.cpp.
References addAppInfo().
Here is the call graph for this function:| FWSERVICES_API void fwServices::registry::AppConfig::parseBundleInformation | ( | const std::vector< std::shared_ptr< ::fwRuntime::Extension > > & | extensions | ) |
Parses bundle information to retrieve configuration declaration.