From 03ae171290a27139b40b671da4c1ba52b508aa82 Mon Sep 17 00:00:00 2001 From: prascle Date: Wed, 29 Apr 2009 14:22:19 +0000 Subject: [PATCH] PR: default policy --- src/ResourcesManager/ResourcesManager.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/ResourcesManager/ResourcesManager.cxx b/src/ResourcesManager/ResourcesManager.cxx index 6bdfdce25..e09908f76 100644 --- a/src/ResourcesManager/ResourcesManager.cxx +++ b/src/ResourcesManager/ResourcesManager.cxx @@ -58,6 +58,7 @@ ResourcesManager_cpp(const char *xmlFilePath) : _resourceManagerMap["cycl"]=&cycl; _resourceManagerMap["altcycl"]=&altcycl; _resourceManagerMap["best"]=&altcycl; + _resourceManagerMap[""]=&altcycl; } //============================================================================= @@ -80,6 +81,7 @@ ResourcesManager_cpp::ResourcesManager_cpp() throw(ResourcesException) _resourceManagerMap["cycl"]=&cycl; _resourceManagerMap["altcycl"]=&altcycl; _resourceManagerMap["best"]=&altcycl; + _resourceManagerMap[""]=&altcycl; _isAppliSalomeDefined = (getenv("APPLI") != 0); if(!getenv("KERNEL_ROOT_DIR")) throw ResourcesException("you must define KERNEL_ROOT_DIR environment variable!!"); @@ -386,7 +388,8 @@ const MapOfParserResourcesType& ResourcesManager_cpp::GetList() const string ResourcesManager_cpp::Find(const std::string& policy, const std::vector& listOfMachines) { - if(_resourceManagerMap.count(policy)==0)return ""; + if(_resourceManagerMap.count(policy)==0) + return _resourceManagerMap[""]->Find(listOfMachines,_resourcesList); return _resourceManagerMap[policy]->Find(listOfMachines,_resourcesList); } -- 2.39.2