Salome HOME
648ab0650b80266640cc05165040e187d10593c1
[tools/libbatch.git] / src / Core / Constants.hxx
1 //  Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 //  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 //  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
6 //  This library is free software; you can redistribute it and/or
7 //  modify it under the terms of the GNU Lesser General Public
8 //  License as published by the Free Software Foundation; either
9 //  version 2.1 of the License.
10 //
11 //  This library is distributed in the hope that it will be useful,
12 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
13 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
14 //  Lesser General Public License for more details.
15 //
16 //  You should have received a copy of the GNU Lesser General Public
17 //  License along with this library; if not, write to the Free Software
18 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
19 //
20 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22 /*
23  * Constants.hxx :
24  *
25  * Auteur : Renaud BARATE - EDF R&D
26  * Date   : January 2010
27  *
28  */
29
30 #ifndef _CONSTANTS_H_
31 #define _CONSTANTS_H_
32
33 #include <string>
34
35 #include "Defines.hxx"
36
37 // These macros simplify the creation of new string constants for keys and
38 // values in parameters map.
39 // TODO: replace those static declarations by an external description file (XML for instance)
40 #define decl_extern_Constant(constant) extern BATCH_EXPORT const std::string constant
41 #define def_Constant(constant) const std::string constant = #constant
42
43 namespace Batch {
44
45   // Declaration of the keys for the parameter map
46   decl_extern_Constant(ARGUMENTS);
47   decl_extern_Constant(EXECUTABLE);
48   decl_extern_Constant(ID);
49   decl_extern_Constant(INFILE);
50   decl_extern_Constant(MAXCPUTIME);
51   decl_extern_Constant(MAXDISKSIZE);
52   decl_extern_Constant(MAXRAMSIZE);
53   decl_extern_Constant(MAXWALLTIME);
54   decl_extern_Constant(NAME);
55   decl_extern_Constant(NBPROC);
56   decl_extern_Constant(NBPROCPERNODE);
57   decl_extern_Constant(OUTFILE);
58   decl_extern_Constant(PID);
59   decl_extern_Constant(QUEUE);
60   decl_extern_Constant(STATE);
61   decl_extern_Constant(WORKDIR);
62   decl_extern_Constant(HOMEDIR);
63   decl_extern_Constant(EXCLUSIVE);
64
65   // These constants define the status of a job (parameter STATE)
66   decl_extern_Constant(CREATED);
67   decl_extern_Constant(IN_PROCESS);
68   decl_extern_Constant(QUEUED);
69   decl_extern_Constant(RUNNING);
70   decl_extern_Constant(PAUSED);
71   decl_extern_Constant(FINISHED);
72   decl_extern_Constant(FAILED);
73
74 }
75
76 #endif