Salome HOME
Merge 'master' branch into 'V9_dev' branch
[modules/kernel.git] / src / Launcher / SALOME_Launcher.cxx
index 3c16fdf7a026ca21a57ab77c4544de17e4bd0a67..9a524131dd964c5ad282a1ebb350de91b89e4ba5 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2014  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2016  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -24,6 +24,8 @@
 #include "BatchTest.hxx"
 #include "OpUtil.hxx"
 #include "SALOME_ContainerManager.hxx"
+#include "SALOME_NamingService.hxx"
+#include "SALOME_ResourcesManager.hxx"
 #include "Utils_CorbaException.hxx"
 
 
@@ -31,6 +33,8 @@
 #include "Launcher_Job_YACSFile.hxx"
 #include "Launcher_Job_PythonSALOME.hxx"
 
+#include "utilities.h"
+
 #ifdef WIN32
 # include <process.h>
 #else
@@ -59,7 +63,7 @@ SALOME_Launcher::SALOME_Launcher(CORBA::ORB_ptr orb, PortableServer::POA_var poa
   _NS = new SALOME_NamingService(orb);
   _ResManager = new SALOME_ResourcesManager(orb,poa,_NS);
   _l.SetResourcesManager(_ResManager->GetImpl());
-  _ContManager = new SALOME_ContainerManager(orb,poa,_ResManager,_NS);
+  _ContManager = new SALOME_ContainerManager(orb,poa,_NS);
   _ResManager->_remove_ref();
   _ContManager->_remove_ref();
 
@@ -298,6 +302,22 @@ SALOME_Launcher::getJobDumpState(CORBA::Long job_id, const char * directory)
   return rtn;
 }
 
+CORBA::Boolean
+SALOME_Launcher::getJobWorkFile(CORBA::Long job_id, const char * work_file, const char * directory)
+{
+  CORBA::Boolean rtn = false;
+  try
+  {
+    rtn = _l.getJobWorkFile(job_id, work_file, directory);
+  }
+  catch(const LauncherException &ex)
+  {
+    INFOS(ex.msg.c_str());
+    THROW_SALOME_CORBA_EXCEPTION(ex.msg.c_str(),SALOME::BAD_PARAM);
+  }
+  return rtn;
+}
+
 void 
 SALOME_Launcher::removeJob(CORBA::Long job_id)
 {
@@ -336,7 +356,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