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
23 #include "BL_Traces.hxx"
34 Job(const std::string & name);
37 void setName(const std::string & name);
38 std::string getName();
40 enum JobType {YACS_SCHEMA, COMMAND};
41 void setType(BL::Job::JobType type);
42 BL::Job::JobType getType();
44 void setYACSFile(std::string & yacs_file);
45 std::string & getYACSFile();
47 void setCommand(std::string & command);
48 std::string & getCommand();
52 std::string batch_directory;
53 std::string expected_during_time;
54 std::string expected_memory;
57 void setBatchParameters(BL::Job::BatchParam & param);
58 BL::Job::BatchParam & getBatchParameters();
62 std::string result_directory;
63 std::list<std::string> input_files_list;
64 std::list<std::string> output_files_list;
66 void setFilesParameters(BL::Job::FilesParam & param);
67 BL::Job::FilesParam & getFilesParameters();
69 void setMachine(std::string & machine);
70 std::string & getMachine();
72 enum State {CREATED, IN_PROCESS, QUEUED, RUNNING, PAUSED, FINISHED, ERROR};
73 void setState(BL::Job::State state);
74 BL::Job::State getState();
76 enum ThreadState {NOTHING, STARTING};
77 void setThreadState(BL::Job::ThreadState state);
78 BL::Job::ThreadState getThreadState();
80 void setSalomeLauncherId(int id);
81 int getSalomeLauncherId();
85 BL::Job::State _state;
86 BL::Job::ThreadState _thread_state;
90 BL::Job::JobType _type;
91 std::string _yacs_file;
94 BL::Job::BatchParam _batch_params;
95 BL::Job::FilesParam _files_params;
96 std::string _machine_choosed;
98 int _salome_launcher_id;