1 // Copyright (C) 2009 CEA/DEN, EDF R&D
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License.
8 // This library is distributed in the hope that it will be useful,
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11 // Lesser General Public License for more details.
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
24 DEBTRACE("Creating BL::Job");
28 _batch_params.batch_directory = "";
29 _batch_params.expected_during_time = "";
30 _batch_params.expected_memory = "";
31 _batch_params.nb_proc = 0;
32 _files_params.result_directory = "";
33 _machine_choosed = "";
34 _state = BL::Job::CREATED;
35 _thread_state = BL::Job::NOTHING;
36 _salome_launcher_id = -1;
39 BL::Job::Job(const std::string & name)
41 DEBTRACE("Creating BL::Job with name : " << name);
45 _batch_params.batch_directory = "";
46 _batch_params.expected_during_time = "";
47 _batch_params.expected_memory = "";
48 _batch_params.nb_proc = 0;
49 _files_params.result_directory = "";
50 _machine_choosed = "";
51 _state = BL::Job::CREATED;
52 _thread_state = BL::Job::NOTHING;
53 _salome_launcher_id = -1;
60 BL::Job::setName(const std::string & name)
72 BL::Job::setType(BL::Job::JobType type)
84 BL::Job::setYACSFile(std::string & yacs_file)
86 _yacs_file = yacs_file;
90 BL::Job::getYACSFile()
96 BL::Job::setCommand(std::string & command)
102 BL::Job::getCommand()
108 BL::Job::setBatchParameters(BL::Job::BatchParam & param)
110 _batch_params.batch_directory = param.batch_directory;
111 _batch_params.expected_during_time = param.expected_during_time;
112 _batch_params.expected_memory = param.expected_memory;
113 _batch_params.nb_proc = param.nb_proc;
116 BL::Job::BatchParam &
117 BL::Job::getBatchParameters()
119 return _batch_params;
123 BL::Job::setFilesParameters(BL::Job::FilesParam & param)
125 _files_params.result_directory = param.result_directory;
126 _files_params.input_files_list = param.input_files_list;
127 _files_params.output_files_list = param.output_files_list;
130 BL::Job::FilesParam &
131 BL::Job::getFilesParameters()
133 return _files_params;
137 BL::Job::setMachine(std::string & machine)
139 _machine_choosed = machine;
143 BL::Job::getMachine()
145 return _machine_choosed;
149 BL::Job::setState(BL::Job::State state)
161 BL::Job::setThreadState(BL::Job::ThreadState state)
163 _thread_state = state;
167 BL::Job::getThreadState()
169 return _thread_state;
173 BL::Job::setSalomeLauncherId(int id)
175 _salome_launcher_id = id;
179 BL::Job::getSalomeLauncherId()
181 return _salome_launcher_id;