1 // Copyright (C) 2007-2008 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
25 * Auteur : Ivan DUTKA-MALEN - EDF R&D
26 * Date : Septembre 2003
35 #include "Batch_Defines.hxx"
37 #include "Batch_JobInfo.hxx"
38 #include "Batch_BatchManager.hxx"
44 class BATCH_EXPORT JobId
46 friend class BatchManager;
49 // Constructeur standard et destructeur
53 // Constructeur avec le pointeur sur le BatchManager associe et avec une reference
54 JobId(Batch::BatchManager *, std::string ref);
56 // Operateur d'affectation entre objets
57 virtual JobId & operator =(const Batch::JobId &);
59 // Constructeur par recopie
60 JobId(const Batch::JobId &);
62 // Accesseur pour la reference interne
63 virtual std::string getReference() const;
65 // Methodes pour le controle du job
66 virtual void deleteJob() const; // retire un job du gestionnaire
67 virtual void holdJob() const; // suspend un job en file d'attente
68 virtual void releaseJob() const; // relache un job suspendu
69 virtual void alterJob(const Batch::Parametre & param, const Batch::Environnement & env) const; // modifie un job en file d'attente
70 virtual void alterJob(const Batch::Parametre & param) const; // modifie un job en file d'attente
71 virtual void alterJob(const Batch::Environnement & env) const; // modifie un job en file d'attente
72 virtual void setParametre(const Batch::Parametre & param) { return alterJob(param); } // modifie un job en file d'attente
73 virtual void setEnvironnement(const Batch::Environnement & env) { return alterJob(env); } // modifie un job en file d'attente
74 virtual Batch::JobInfo queryJob() const; // renvoie l'etat du job
76 // Methodes pour l'interfacage avec Python (SWIG)
77 // TODO : supprimer ces methodes et transferer leur definitions dans SWIG
78 std::string __str__() const; // SWIG : affichage en Python
79 std::string __repr__() const { return __str__(); }; // SWIG : affichage en Python
82 Batch::BatchManager * _p_batchmanager; // pointeur sur le BatchManager qui controle le job
83 std::string _reference; // reference du job au sein du BatchManager