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_JobInfo.hxx"
34 #include "Batch_BatchManager.hxx"
42 friend class BatchManager;
45 // Constructeur standard et destructeur
49 // Constructeur avec le pointeur sur le BatchManager associe et avec une reference
50 JobId(Batch::BatchManager *, std::string ref);
52 // Operateur d'affectation entre objets
53 virtual JobId & operator =(const Batch::JobId &);
55 // Constructeur par recopie
56 JobId(const Batch::JobId &);
58 // Accesseur pour la reference interne
59 virtual std::string getReference() const;
61 // Methodes pour le controle du job
62 virtual void deleteJob() const; // retire un job du gestionnaire
63 virtual void holdJob() const; // suspend un job en file d'attente
64 virtual void releaseJob() const; // relache un job suspendu
65 virtual void alterJob(const Batch::Parametre & param, const Batch::Environnement & env) const; // modifie un job en file d'attente
66 virtual void alterJob(const Batch::Parametre & param) const; // modifie un job en file d'attente
67 virtual void alterJob(const Batch::Environnement & env) const; // modifie un job en file d'attente
68 virtual void setParametre(const Batch::Parametre & param) { return alterJob(param); } // modifie un job en file d'attente
69 virtual void setEnvironnement(const Batch::Environnement & env) { return alterJob(env); } // modifie un job en file d'attente
70 virtual Batch::JobInfo queryJob() const; // renvoie l'etat du job
72 // Methodes pour l'interfacage avec Python (SWIG)
73 // TODO : supprimer ces methodes et transferer leur definitions dans SWIG
74 std::string __str__() const; // SWIG : affichage en Python
75 std::string __repr__() const { return __str__(); }; // SWIG : affichage en Python
78 Batch::BatchManager * _p_batchmanager; // pointeur sur le BatchManager qui controle le job
79 std::string _reference; // reference du job au sein du BatchManager