7 #ifndef __FWSERVICES_REGISTRY_APPCONFIG_HPP__ 8 #define __FWSERVICES_REGISTRY_APPCONFIG_HPP__ 10 #include "fwServices/config.hpp" 11 #include "fwServices/registry/AppInfo.hpp" 13 #include <fwCore/mt/types.hpp> 15 #include <fwData/Composite.hpp> 17 #include <fwRuntime/ConfigurationElement.hpp> 18 #include <fwRuntime/EConfigurationElement.hpp> 19 #include <fwRuntime/Extension.hpp> 21 #include <fwTools/Object.hpp> 24 #include <unordered_set> 54 FWSERVICES_API
void parseBundleInformation();
61 FWSERVICES_API
void parseBundleInformation(
62 const std::vector< std::shared_ptr< ::fwRuntime::Extension > >& extensions);
74 FWSERVICES_API
void addAppInfo(
const std::string& configId,
75 const std::string& group,
76 const std::string& desc,
77 const AppInfo::ParametersType& parameters,
78 const ::fwRuntime::ConfigurationElement::csptr& config,
79 const std::string& bundleId,
80 const std::string& bundleVersion);
88 FWSERVICES_API ::fwRuntime::ConfigurationElement::csptr getAdaptedTemplateConfig(
const std::string& configId,
89 const FieldAdaptorType replaceFields,
90 bool autoPrefixId )
const;
98 FWSERVICES_API ::fwRuntime::ConfigurationElement::csptr getAdaptedTemplateConfig(
const std::string& configId,
99 ::fwData::Composite::csptr replaceFields,
107 FWSERVICES_API std::shared_ptr< ::fwRuntime::Bundle > getBundle(
const std::string& _configId);
113 FWSERVICES_API std::vector< std::string > getAllConfigs()
const;
119 FWSERVICES_API std::vector< std::string > getConfigsFromGroup(
const std::string& group)
const;
125 FWSERVICES_API
void clearRegistry();
131 FWSERVICES_API
static std::string getUniqueIdentifier(
const std::string& serviceUid =
"" );
134 FWSERVICES_API
static AppConfig::sptr getDefault();
138 typedef std::map< std::string, AppInfo::sptr > Registry;
148 typedef std::unordered_set< std::string > UidParameterReplaceType;
151 FieldAdaptorType compositeToFieldAdaptor( ::fwData::Composite::csptr fieldAdaptors )
const;
153 static void collectUIDForParameterReplace(::fwRuntime::ConfigurationElement::csptr _cfgElem,
154 UidParameterReplaceType& replaceMap);
157 static ::fwRuntime::EConfigurationElement::sptr adaptConfig(::fwRuntime::ConfigurationElement::csptr _cfgElem,
158 const FieldAdaptorType& _fieldAdaptors,
159 const UidParameterReplaceType& _uidParameterReplace,
160 const std::string& _autoPrefixId );
163 static std::string adaptField(
const std::string& _str,
const FieldAdaptorType& _variablesMap );
166 mutable ::fwCore::mt::ReadWriteMutex m_registryMutex;
169 static ::fwCore::mt::Mutex s_idMutex;
172 static AppConfig::sptr s_currentAppConfig;
175 static std::string s_mandatoryParameterIdentifier;
178 typedef std::multimap< std::string, std::string > UidDefinitionType;
179 static UidDefinitionType s_uidDefinitionDictionary;
186 #endif // __FWSERVICES_REGISTRY_APPCONFIG_HPP__ Contains fwAtomsFilter::registry details.
Base class for all FW4SPL's classes.
Namespace fwServices is dedicated to (mimic) the dynamic affectation of methods to (pure data) object...
Registry m_reg
Container of <configId, AppConfig information>
#define fwCoreClassDefinitionsWithFactoryMacro(_classinfo_, _parameters_, _factory_)
Generate common construction methods for classes with one factory.
std::map< std::string, std::string > FieldAdaptorType
Associations of <pattern, value>.
This class allows to register all the configuration which has the point extension "::fwServices::regi...