Salome HOME
Copyright update 2021
[tools/libbatch.git] / src / COORM / BatchManager_COORM.hxx
1 // Copyright (C) 2012-2021  INRIA
2 //
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License, or (at your option) any later version.
7 //
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19
20 #ifndef _BATCHMANAGER_COORM_H_
21 #define _BATCHMANAGER_COORM_H_
22
23 #include "Defines.hxx"
24 #include "JobId.hxx"
25 #include "JobInfo.hxx"
26 #include "FactBatchManager.hxx"
27 #include "BatchManager.hxx"
28
29 namespace Batch
30 {
31       class BATCH_EXPORT BatchManager_COORM : public BatchManager
32       {
33               public:
34                       // Constructeur
35                       BatchManager_COORM(const FactBatchManager * parent, const char * host="localhost",
36                                       const char * username="",
37                                       CommunicationProtocolType protocolType = SSH, const char * mpiImpl="nompi");
38
39                       // Destructeur
40                       virtual ~BatchManager_COORM();
41
42                       // Soumet un job
43                       virtual const JobId runJob(const Job & job);
44
45                       // Supprime un job
46                       virtual void deleteJob(const JobId & jobid);
47
48                       // Donne l'etat du job
49                       virtual JobInfo queryJob(const JobId & jobid);
50
51                       // Modifie un job en file d'attente
52                       virtual void setParametre(const JobId & jobid, const Parametre & param) { return alterJob(jobid, param); }
53
54                       // Modifie un job en file d'attente
55                       virtual void setEnvironnement(const JobId & jobid, const Environnement & env) { return alterJob(jobid, env); }
56
57                       virtual void exportInputFiles(const Job & job);
58               protected:
59                       std::string buildBatchScript(const Job & job);
60
61 #ifdef SWIG
62               public:
63                       // Recupere le l'identifiant d'un job deja soumis au BatchManager
64                       virtual const JobId getJobIdByReference(const char * ref) { return BatchManager::getJobIdByReference(ref); }
65 #endif
66       };
67 }
68
69 #endif