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
23 * Auteur : Ivan DUTKA-MALEN - EDF R&D
24 * Date : Septembre 2003
33 #include "Batch_Defines.hxx"
35 #include "Batch_JobInfo.hxx"
36 #include "Batch_BatchManager.hxx"
42 class BATCH_EXPORT JobId
44 friend class BatchManager;
47 // Constructeur standard et destructeur
51 // Constructeur avec le pointeur sur le BatchManager associe et avec une reference
52 JobId(Batch::BatchManager *, std::string ref);
54 // Operateur d'affectation entre objets
55 virtual JobId & operator =(const Batch::JobId &);
57 // Constructeur par recopie
58 JobId(const Batch::JobId &);
60 // Accesseur pour la reference interne
61 virtual std::string getReference() const;
63 // Methodes pour le controle du job
64 virtual void deleteJob() const; // retire un job du gestionnaire
65 virtual void holdJob() const; // suspend un job en file d'attente
66 virtual void releaseJob() const; // relache un job suspendu
67 virtual void alterJob(const Batch::Parametre & param, const Batch::Environnement & env) const; // modifie un job en file d'attente
68 virtual void alterJob(const Batch::Parametre & param) const; // modifie un job en file d'attente
69 virtual void alterJob(const Batch::Environnement & env) const; // modifie un job en file d'attente
70 virtual void setParametre(const Batch::Parametre & param) { return alterJob(param); } // modifie un job en file d'attente
71 virtual void setEnvironnement(const Batch::Environnement & env) { return alterJob(env); } // modifie un job en file d'attente
72 virtual Batch::JobInfo queryJob() const; // renvoie l'etat du job
74 // Methodes pour l'interfacage avec Python (SWIG)
75 // TODO : supprimer ces methodes et transferer leur definitions dans SWIG
76 std::string __str__() const; // SWIG : affichage en Python
77 std::string __repr__() const { return __str__(); }; // SWIG : affichage en Python
80 Batch::BatchManager * _p_batchmanager; // pointeur sur le BatchManager qui controle le job
81 std::string _reference; // reference du job au sein du BatchManager