From fd786ec0d4a434c7bf40ee7074ba0621ca1c6fb2 Mon Sep 17 00:00:00 2001 From: adam Date: Fri, 19 Feb 2010 13:54:55 +0000 Subject: [PATCH] windows port --- src/Container/SALOME_ContainerManager.cxx | 8 ++++---- src/Launcher/Launcher_Job.cxx | 14 +++++++------- src/Launcher/Launcher_Job.hxx | 3 ++- src/Launcher/Launcher_Job_Command.hxx | 2 +- src/Launcher/Launcher_Job_PythonSALOME.hxx | 2 +- src/Launcher/Launcher_Job_SALOME.hxx | 2 +- src/Launcher/Launcher_Job_YACSFile.hxx | 2 +- src/Launcher/SALOME_Launcher.cxx | 2 +- 8 files changed, 18 insertions(+), 17 deletions(-) diff --git a/src/Container/SALOME_ContainerManager.cxx b/src/Container/SALOME_ContainerManager.cxx index 9bc68c2cb..1b17f0dd6 100644 --- a/src/Container/SALOME_ContainerManager.cxx +++ b/src/Container/SALOME_ContainerManager.cxx @@ -214,7 +214,7 @@ SALOME_ContainerManager::GiveContainer(const Engines::ContainerParameters& param MESSAGE("[GiveContainer] starting with mode: " << mode); // Step 1: Find Container for find and findorstart mode - if (mode == "find" or mode == "findorstart") + if (mode == "find" || mode == "findorstart") { ret = FindContainer(params, params.resource_params.resList); if(!CORBA::is_nil(ret)) @@ -310,7 +310,7 @@ SALOME_ContainerManager::GiveContainer(const Engines::ContainerParameters& param Engines::Container_var cont=Engines::Container::_narrow(obj); if(!cont->_non_existent()) { - if(std::string(params.mode.in())=="getorstart" or std::string(params.mode.in())=="get"){ + if(std::string(params.mode.in())=="getorstart" || std::string(params.mode.in())=="get"){ return cont._retn(); /* the container exists and params.mode is getorstart or get use it*/ } else @@ -1103,7 +1103,7 @@ SALOME_ContainerManager::checkPaCOParameters(Engines::ContainerParameters & para } // Check parallelLib std::string parallelLib = params.parallelLib.in(); - if (parallelLib != "Mpi" and parallelLib != "Dummy") + if (parallelLib != "Mpi" && parallelLib != "Dummy") { INFOS("[checkPaCOParameters] parallelLib is not correctly defined"); INFOS("[checkPaCOParameters] you can chosse between: Mpi and Dummy"); @@ -1123,7 +1123,7 @@ SALOME_ContainerManager::checkPaCOParameters(Engines::ContainerParameters & para std::string username = resource_definition->username.in(); std::string applipath = resource_definition->applipath.in(); - if (protocol == "" or username == "" or applipath == "") + if (protocol == "" || username == "" || applipath == "") { INFOS("[checkPaCOParameters] resource selected is not well defined"); INFOS("[checkPaCOParameters] resource name: " << resource_definition->name.in()); diff --git a/src/Launcher/Launcher_Job.cxx b/src/Launcher/Launcher_Job.cxx index 286892386..6e698d409 100644 --- a/src/Launcher/Launcher_Job.cxx +++ b/src/Launcher/Launcher_Job.cxx @@ -75,10 +75,10 @@ void Launcher::Job::setState(const std::string & state) { // State of a Job: CREATED, QUEUED, RUNNING, FINISHED, FAILED - if (state != "CREATED" and - state != "QUEUED" and - state != "RUNNING" and - state != "FINISHED" and + if (state != "CREATED" && + state != "QUEUED" && + state != "RUNNING" && + state != "FINISHED" && state != "FAILED") { throw LauncherException("Bad state, this state does not exist: " + state); @@ -354,9 +354,9 @@ Launcher::Job::getLaunchDate() std::string launch_date = ctime(&rawtime); int i = 0 ; for (;i < launch_date.size(); i++) - if (launch_date[i] == '/' or - launch_date[i] == '-' or - launch_date[i] == ':' or + if (launch_date[i] == '/' || + launch_date[i] == '-' || + launch_date[i] == ':' || launch_date[i] == ' ') launch_date[i] = '_'; launch_date.erase(--launch_date.end()); // Last caracter is a \n diff --git a/src/Launcher/Launcher_Job.hxx b/src/Launcher/Launcher_Job.hxx index 853ca7953..aa40cb201 100644 --- a/src/Launcher/Launcher_Job.hxx +++ b/src/Launcher/Launcher_Job.hxx @@ -22,6 +22,7 @@ #define _LAUNCHER_JOB_HXX_ #include +#include "Launcher_Utils.hxx" #include "ResourcesManager.hxx" #include @@ -44,7 +45,7 @@ namespace Launcher { - class Job + class LAUNCHER_EXPORT Job { public: Job(); diff --git a/src/Launcher/Launcher_Job_Command.hxx b/src/Launcher/Launcher_Job_Command.hxx index a5ef7e4bf..7f84d8254 100644 --- a/src/Launcher/Launcher_Job_Command.hxx +++ b/src/Launcher/Launcher_Job_Command.hxx @@ -30,7 +30,7 @@ namespace Launcher { - class Job_Command : virtual public Launcher::Job + class LAUNCHER_EXPORT Job_Command : virtual public Launcher::Job { public: Job_Command(); diff --git a/src/Launcher/Launcher_Job_PythonSALOME.hxx b/src/Launcher/Launcher_Job_PythonSALOME.hxx index 106d6f0b3..5abe22440 100644 --- a/src/Launcher/Launcher_Job_PythonSALOME.hxx +++ b/src/Launcher/Launcher_Job_PythonSALOME.hxx @@ -25,7 +25,7 @@ namespace Launcher { - class Job_PythonSALOME : virtual public Launcher::Job_SALOME + class LAUNCHER_EXPORT Job_PythonSALOME : virtual public Launcher::Job_SALOME { public: Job_PythonSALOME(); diff --git a/src/Launcher/Launcher_Job_SALOME.hxx b/src/Launcher/Launcher_Job_SALOME.hxx index de351ab08..93f4a67bb 100644 --- a/src/Launcher/Launcher_Job_SALOME.hxx +++ b/src/Launcher/Launcher_Job_SALOME.hxx @@ -30,7 +30,7 @@ namespace Launcher { - class Job_SALOME : virtual public Launcher::Job + class LAUNCHER_EXPORT Job_SALOME : virtual public Launcher::Job { public: Job_SALOME(); diff --git a/src/Launcher/Launcher_Job_YACSFile.hxx b/src/Launcher/Launcher_Job_YACSFile.hxx index b789226b1..967af00a7 100644 --- a/src/Launcher/Launcher_Job_YACSFile.hxx +++ b/src/Launcher/Launcher_Job_YACSFile.hxx @@ -25,7 +25,7 @@ namespace Launcher { - class Job_YACSFile : virtual public Launcher::Job_SALOME + class LAUNCHER_EXPORT Job_YACSFile : virtual public Launcher::Job_SALOME { public: Job_YACSFile(); diff --git a/src/Launcher/SALOME_Launcher.cxx b/src/Launcher/SALOME_Launcher.cxx index fafdc5e0f..8cec91830 100644 --- a/src/Launcher/SALOME_Launcher.cxx +++ b/src/Launcher/SALOME_Launcher.cxx @@ -86,7 +86,7 @@ SALOME_Launcher::createJob(const Engines::JobParameters & job_parameters) { std::string job_type = job_parameters.job_type.in(); - if (job_type != "command" and job_type != "yacs_file" and job_type != "python_salome") + if (job_type != "command" && job_type != "yacs_file" && job_type != "python_salome") { std::string message("SALOME_Launcher::createJob: bad job type: "); message += job_type; -- 2.39.2