1 // Copyright (C) 2005 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either
7 // version 2.1 of the License.
9 // This library is distributed in the hope that it will be useful
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // Lesser General Public License for more details.
14 // You should have received a copy of the GNU Lesser General Public
15 // License along with this library; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 #ifndef __SALOME_LAUNCHER_HXX__
21 #define __SALOME_LAUNCHER_HXX__
23 #include <SALOMEconfig.h>
24 #include CORBA_CLIENT_HEADER(SALOME_ContainerManager)
25 #include "SALOME_ContainerManager.hxx"
26 #include "BatchLight_BatchManager.hxx"
30 class SALOME_NamingService;
32 #if defined LAUNCHER_EXPORTS
34 #define LAUNCHER_EXPORT __declspec( dllexport )
36 #define LAUNCHER_EXPORT
40 #define LAUNCHER_EXPORT __declspec( dllimport )
42 #define LAUNCHER_EXPORT
46 class LAUNCHER_EXPORT SALOME_Launcher:
47 public POA_Engines::SalomeLauncher,
48 public PortableServer::RefCountServantBase
52 SALOME_Launcher(CORBA::ORB_ptr orb, PortableServer::POA_var poa);
55 CORBA::Long submitSalomeJob(const char * fileToExecute ,
56 const Engines::FilesList& filesToExport ,
57 const Engines::FilesList& filesToImport ,
58 const CORBA::Long NumberOfProcessors ,
59 const Engines::MachineParameters& params);
61 char* querySalomeJob( const CORBA::Long jobId, const Engines::MachineParameters& params);
62 void deleteSalomeJob( const CORBA::Long jobId, const Engines::MachineParameters& params);
63 void getResultSalomeJob( const char * directory, const CORBA::Long jobId, const Engines::MachineParameters& params );
67 static const char *_LauncherNameInNS;
70 BatchLight::BatchManager *FactoryBatchManager( const Engines::MachineParameters* params ) throw(SALOME_Exception);
72 std::map <std::string,BatchLight::BatchManager*> _batchmap;
74 PortableServer::POA_var _poa;
75 SALOME_ContainerManager *_ContManager;
76 SALOME_ResourcesManager *_ResManager;
77 SALOME_NamingService *_NS;