Salome HOME
New access protocol rsync.
[modules/yacs.git] / src / Launcher / SALOME_Launcher.cxx
index 8849b855e8c979e00a7a5551718e9073cd86888d..cc7129bf0878b7e0a88d12eb4348cc887667856a 100644 (file)
@@ -32,6 +32,7 @@
 #include "Launcher_Job_Command.hxx"
 #include "Launcher_Job_YACSFile.hxx"
 #include "Launcher_Job_PythonSALOME.hxx"
+#include "Launcher_Job_CommandSALOME.hxx"
 
 #include "utilities.h"
 
@@ -95,21 +96,22 @@ SALOME_Launcher::createJob(const Engines::JobParameters & job_parameters)
 {
   std::string job_type = job_parameters.job_type.in();
 
-  if (job_type != "command" && job_type != "yacs_file" && job_type != "python_salome")
-  {
-    std::string message("SALOME_Launcher::createJob: bad job type: ");
-    message += job_type;
-    THROW_SALOME_CORBA_EXCEPTION(message.c_str(), SALOME::INTERNAL_ERROR);
-  }
-
   Launcher::Job * new_job; // It is Launcher_cpp that is going to destroy it
 
-  if (job_type == "command")
+  if (job_type == Launcher::Job_Command::TYPE_NAME)
     new_job = new Launcher::Job_Command();
-  else if (job_type == "yacs_file")
+  else if (job_type == Launcher::Job_CommandSALOME::TYPE_NAME)
+    new_job = new Launcher::Job_CommandSALOME();
+  else if (job_type == Launcher::Job_YACSFile::TYPE_NAME)
     new_job = new Launcher::Job_YACSFile();
-  else if (job_type == "python_salome")
+  else if (job_type == Launcher::Job_PythonSALOME::TYPE_NAME)
     new_job = new Launcher::Job_PythonSALOME();
+  else
+  {
+    std::string message("SALOME_Launcher::createJob: bad job type: ");
+    message += job_type;
+    THROW_SALOME_CORBA_EXCEPTION(message.c_str(), SALOME::INTERNAL_ERROR);
+  }
 
   // Name
   new_job->setJobName(job_parameters.job_name.in());
@@ -375,7 +377,7 @@ SALOME_Launcher::stopJob(CORBA::Long job_id)
 /*! CORBA Method:
  *  Create a job in the launcher with a file
  *  \param xmlExecuteFile     : .xml to parse that contains job description
- *  \param clusterName        : machine choosed
+ *  \param clusterName        : machine chosen
  */
 //=============================================================================
 CORBA::Long