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))
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
}
// 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");
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());
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);
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
#define _LAUNCHER_JOB_HXX_
#include <SALOMEconfig.h>
+#include "Launcher_Utils.hxx"
#include "ResourcesManager.hxx"
#include <stdlib.h>
namespace Launcher
{
- class Job
+ class LAUNCHER_EXPORT Job
{
public:
Job();
namespace Launcher
{
- class Job_Command : virtual public Launcher::Job
+ class LAUNCHER_EXPORT Job_Command : virtual public Launcher::Job
{
public:
Job_Command();
namespace Launcher
{
- class Job_PythonSALOME : virtual public Launcher::Job_SALOME
+ class LAUNCHER_EXPORT Job_PythonSALOME : virtual public Launcher::Job_SALOME
{
public:
Job_PythonSALOME();
namespace Launcher
{
- class Job_SALOME : virtual public Launcher::Job
+ class LAUNCHER_EXPORT Job_SALOME : virtual public Launcher::Job
{
public:
Job_SALOME();
namespace Launcher
{
- class Job_YACSFile : virtual public Launcher::Job_SALOME
+ class LAUNCHER_EXPORT Job_YACSFile : virtual public Launcher::Job_SALOME
{
public:
Job_YACSFile();
{
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;