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/
23 * Auteur : Ivan DUTKA-MALEN - EDF R&D
24 * Date : Septembre 2003
29 #include "Batch_Job.hxx"
30 #include "Batch_Parametre.hxx"
32 //#include "MEDMEM_STRING.hxx"
38 Job::Job() : _param(), _env()
45 Job::Job(Parametre param) : _param(param), _env()
52 Job::Job(Environnement env) : _param(), _env(env)
59 Job::Job(Parametre param, Environnement env) : _param(param), _env(env)
64 // Operateur pour l'affichage sur un stream
65 ostream & operator <<(ostream & os, const Job & job)
67 return os << job.__str__();
71 Batch::Parametre Job::getParametre() const
77 void Job::setParametre(const Batch::Parametre & param)
83 Environnement Job::getEnvironnement() const
89 void Job::setEnvironnement(const Environnement & env)
95 // Methode pour l'interfacage avec Python (SWIG) : affichage en Python
96 string Job::__str__() const {
99 str << "<Job (" << this << ") :" << endl;
100 str << " Parametre :" << endl;
101 Parametre::const_iterator itp;
102 for(itp=_param.begin(); itp!=_param.end(); itp++) {
103 str << " * " << (*itp).first << " : " << (*itp).second << endl;
105 str << " Environnement :" << endl;
106 Environnement::const_iterator ite;
107 for(ite=_env.begin(); ite!=_env.end(); ite++) {
108 str << " * " << (*ite).first << " : " << (*ite).second << endl;