4 * Auteur : Ivan DUTKA-MALEN - EDF R&D
5 * Date : Septembre 2003
10 #include "Batch_JobId.hxx"
11 #include "Batch_BatchManager.hxx"
14 //#include "MEDMEM_STRING.hxx"
19 // Constructeur standard
20 JobId::JobId() : _p_batchmanager(), _reference("undefined")
25 // Constructeur avec le pointeur sur le BatchManager associe et avec une reference
26 JobId::JobId(BatchManager * _p_bm, string ref) : _p_batchmanager(_p_bm), _reference(ref)
37 // Operateur d'affectation entre objets
38 JobId & JobId::operator =(const JobId & jobid)
40 _p_batchmanager = jobid._p_batchmanager;
41 _reference = jobid._reference;
46 // Constructeur par recopie
47 JobId::JobId(const JobId & jobid) : _p_batchmanager(jobid._p_batchmanager), _reference(jobid._reference)
52 // Accesseur pour la reference interne
53 string JobId::getReference() const
58 // Methode pour le controle du job : retire le job du gestionnaire
59 void JobId::deleteJob() const
61 assert(_p_batchmanager != 0);
62 _p_batchmanager->deleteJob(*this);
65 // Methode pour le controle du job : suspend le job en file d'attente
66 void JobId::holdJob() const
68 assert(_p_batchmanager != 0);
69 _p_batchmanager->holdJob(*this);
72 // Methode pour le controle du job : relache le job suspendu
73 void JobId::releaseJob() const
75 assert(_p_batchmanager != 0);
76 _p_batchmanager->releaseJob(*this);
79 // Methode pour le controle du job : modifie le job en file d'attente
80 void JobId::alterJob(const Parametre & param, const Environnement & env) const
82 assert(_p_batchmanager != 0);
83 _p_batchmanager->alterJob(*this, param, env);
86 // Methode pour le controle du job : modifie le job en file d'attente
87 void JobId::alterJob(const Parametre & param) const
89 assert(_p_batchmanager != 0);
90 _p_batchmanager->alterJob(*this, param);
93 // Methode pour le controle du job : modifie le job en file d'attente
94 void JobId::alterJob(const Environnement & env) const
96 assert(_p_batchmanager != 0);
97 _p_batchmanager->alterJob(*this, env);
100 // Methode pour le controle du job : renvoie l'etat du job
101 JobInfo JobId::queryJob() const
103 assert(_p_batchmanager != 0);
104 return _p_batchmanager->queryJob(*this);
108 // Methode pour l'interfacage avec Python (SWIG) : affichage en Python
109 string JobId::__str__() const {
110 //MEDMEM::STRING str;
112 str << "<JobId (" << this << ") : referenced '" << _reference << "'>";