fw4spl
AppConfigParameters.hpp
1 /* ***** BEGIN LICENSE BLOCK *****
2  * FW4SPL - Copyright (C) IRCAD, 2009-2017.
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 __FWSERVICES_REGISTRY_APPCONFIGPARAMETERS_HPP__
8 #define __FWSERVICES_REGISTRY_APPCONFIGPARAMETERS_HPP__
9 
10 #include "fwServices/config.hpp"
11 #include "fwServices/registry/AppConfig.hpp"
12 
13 #include <fwCore/mt/types.hpp>
14 
15 #include <fwRuntime/ConfigurationElement.hpp>
16 #include <fwRuntime/EConfigurationElement.hpp>
17 
18 #include <fwTools/Object.hpp>
19 
20 #include <map>
21 
22 namespace fwServices
23 {
24 
25 namespace registry
26 {
27 
32 class FWSERVICES_CLASS_API AppConfigParameters : public ::fwCore::BaseObject
33 {
34 
35 public:
36 
38 
40  FWSERVICES_API static AppConfigParameters::sptr getDefault();
41 
43  FWSERVICES_API virtual ~AppConfigParameters();
44 
50  FWSERVICES_API void parseBundleInformation();
51 
56  FWSERVICES_API const FieldAdaptorType& getParameters( const std::string& extensionId ) const;
57 
62  FWSERVICES_API void clearRegistry();
63 
64 protected:
65 
66  typedef std::map< std::string, FieldAdaptorType > Registry;
67 
69  Registry m_reg;
70 
72  FWSERVICES_API AppConfigParameters();
73 
75  mutable ::fwCore::mt::ReadWriteMutex m_registryMutex;
76 
78  static AppConfigParameters::sptr s_appConfigParameters;
79 
80 };
81 
82 } // namespace registry
83 
84 } // namespace fwServices
85 
86 #endif // __FWSERVICES_REGISTRY_APPCONFIGPARAMETERS_HPP__
87 
Contains fwAtomsFilter::registry details.
Base class for all FW4SPL&#39;s classes.
Definition: BaseObject.hpp:22
This class allows to register all the configuration parameters which has the point extension "::fwSer...
Namespace fwServices is dedicated to (mimic) the dynamic affectation of methods to (pure data) object...
mutable::fwCore::mt::ReadWriteMutex m_registryMutex
Used to protect the registry access.
std::map< std::string, std::string > FieldAdaptorType
Associations of <pattern, value>.
Definition: AppInfo.hpp:24
#define fwCoreClassDefinitionsWithFactoryMacro(_classinfo_, _parameters_, _factory_)
Generate common construction methods for classes with one factory.
Registry m_reg
Container of parameter information.
static AppConfigParameters::sptr s_appConfigParameters
The global instance of the app config parameters.