Commit 137db60609ad6529d631503eca6650af7dc09d65
1 parent
3caf58ee
Exists in
master
and in
84 other branches
working
Showing
1 changed file
with
18 additions
and
21 deletions
Show diff stats
src/Parameters/ServicesServer.hh
... | ... | @@ -13,12 +13,12 @@ |
13 | 13 | #include <string> |
14 | 14 | #include <typeinfo> |
15 | 15 | #include <list> |
16 | - | |
17 | 16 | #include <boost/any.hpp> |
18 | 17 | #include <boost/function.hpp> |
19 | 18 | #include <boost/bind.hpp> |
20 | 19 | #include <boost/functional/factory.hpp> |
21 | 20 | #include <boost/shared_ptr.hpp> |
21 | +#include <vector> | |
22 | 22 | |
23 | 23 | #include "dsgpatt_Singleton.hh" |
24 | 24 | #include "Demangle.hh" |
... | ... | @@ -54,6 +54,9 @@ namespace AMDA { |
54 | 54 | typedef boost::function < StatisticProcess*(Parameter &, const int&) > StatisticProcessFactory; |
55 | 55 | typedef std::map<std::string, StatisticProcessFactory> StatisticProcessFactories; |
56 | 56 | |
57 | + // map to link process with pluging | |
58 | + typedef std::map<std::string, std::map<std::string, std::string>> AMDA_ProcessPluginMaps; | |
59 | + | |
57 | 60 | class FileConfigurator; |
58 | 61 | typedef boost::shared_ptr<FileConfigurator> ParameterConfiguratorSPtr; |
59 | 62 | |
... | ... | @@ -200,21 +203,26 @@ namespace AMDA { |
200 | 203 | // link Process with the corresponding Pluging |
201 | 204 | |
202 | 205 | void linkProcessWithPlugin(std::string process, std::string pluginPath) { |
203 | - _processPlugingMap[process] = pluginPath; | |
206 | + if (pluginPath != "") | |
207 | + _processPluginMaps["process"].insert(std::pair<std::string, std::string>(process, pluginPath)); | |
204 | 208 | } |
205 | 209 | |
206 | 210 | void linkStatisticProcessWithPlugin(std::string process, std::string pluginPath) { |
207 | - _StatisticProcessPlugingMap[process] =pluginPath; | |
211 | + if (pluginPath != "") | |
212 | + _processPluginMaps["statisticProcess"].insert(std::pair<std::string, std::string>(process, pluginPath)); | |
208 | 213 | } |
209 | 214 | |
210 | 215 | void linkParamOutputsWithPlugin(std::string process, std::string pluginPath) { |
211 | - _paramOutputPlugingMap[process] = pluginPath; | |
216 | + if (pluginPath != "") | |
217 | + _processPluginMaps["paramOutputs"].insert(std::pair<std::string, std::string>(process, pluginPath)); | |
212 | 218 | } |
213 | 219 | |
214 | 220 | void linkParamGetWithPlugin(std::string process, std::string pluginPath) { |
215 | - _paramGetPlugingMap[process] = pluginPath; | |
221 | + _processPluginMaps["paramGet"].insert(std::pair<std::string, std::string>(process, pluginPath)); | |
216 | 222 | } |
217 | 223 | |
224 | + bool generatePluginsXml(const char* filePath); | |
225 | + | |
218 | 226 | private: |
219 | 227 | |
220 | 228 | ServicesServer(); |
... | ... | @@ -226,10 +234,6 @@ namespace AMDA { |
226 | 234 | * @code ParamGet p = _paramGetFactory[souceParamGet]() |
227 | 235 | */ |
228 | 236 | ParamGetFactories _paramGetFactory; |
229 | - /** | |
230 | - * Map of paramGet and corresponding plugings | |
231 | - */ | |
232 | - std::map<std::string, std::string> _paramGetPlugingMap; | |
233 | 237 | |
234 | 238 | /** |
235 | 239 | * Factory of Process |
... | ... | @@ -237,10 +241,6 @@ namespace AMDA { |
237 | 241 | * @code Process p = _processFactory[souceProcess]() |
238 | 242 | */ |
239 | 243 | ProcessFactories _processFactory; |
240 | - /** | |
241 | - * Map of process and corresponding plugings | |
242 | - */ | |
243 | - std::map<std::string, std::string> _processPlugingMap; | |
244 | 244 | |
245 | 245 | /** |
246 | 246 | * Factory of ParamOutput |
... | ... | @@ -248,23 +248,20 @@ namespace AMDA { |
248 | 248 | * @code ParamOutput p = _paramOutputFactory[souceParamGet]() |
249 | 249 | */ |
250 | 250 | ParamOutputFactories _paramOutputFactory; |
251 | - /** | |
252 | - * Map of process and corresponding plugings | |
253 | - */ | |
254 | - std::map<std::string, std::string> _paramOutputPlugingMap; | |
255 | 251 | |
256 | 252 | /** |
257 | 253 | * Factory of StatisticProcess |
258 | 254 | */ |
259 | 255 | StatisticProcessFactories _statisticProcessFactory; |
260 | - /** | |
261 | - * Map of StatisticProcess and corresponding plugings | |
262 | - */ | |
263 | - std::map<std::string, std::string> _StatisticProcessPlugingMap; | |
264 | 256 | |
265 | 257 | ParameterConfiguratorSPtr _configurator; |
266 | 258 | |
267 | 259 | /** |
260 | + * Map of processes and corresponding plugins | |
261 | + */ | |
262 | + AMDA_ProcessPluginMaps _processPluginMaps; | |
263 | + | |
264 | + /** | |
268 | 265 | * List of services. |
269 | 266 | */ |
270 | 267 | ServiceList _serviceList; | ... | ... |