Salome HOME
Update copyrights
[tools/libbatch.git] / src / Core / Batch_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  * Batch_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 "Batch_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(ACCOUNT);
47   decl_extern_Constant(ARGUMENTS);
48   decl_extern_Constant(CHECKPOINT);
49   decl_extern_Constant(CKPTINTERVAL);
50   decl_extern_Constant(CREATIONTIME);
51   decl_extern_Constant(EGROUP);
52   decl_extern_Constant(ELIGIBLETIME);
53   decl_extern_Constant(ENDTIME);
54   decl_extern_Constant(EUSER);
55   decl_extern_Constant(EXECUTABLE);
56   decl_extern_Constant(EXECUTIONHOST);
57   decl_extern_Constant(EXITCODE);
58   decl_extern_Constant(HOLD);
59   decl_extern_Constant(ID);
60   decl_extern_Constant(INFILE);
61   decl_extern_Constant(MAIL);
62   decl_extern_Constant(MAXCPUTIME);
63   decl_extern_Constant(MAXDISKSIZE);
64   decl_extern_Constant(MAXRAMSIZE);
65   decl_extern_Constant(MAXWALLTIME);
66   decl_extern_Constant(MODIFICATIONTIME);
67   decl_extern_Constant(NAME);
68   decl_extern_Constant(NBPROC);
69   decl_extern_Constant(OUTFILE);
70   decl_extern_Constant(PID);
71   decl_extern_Constant(QUEUE);
72   decl_extern_Constant(QUEUEDTIME);
73   decl_extern_Constant(SERVER);
74   decl_extern_Constant(STARTTIME);
75   decl_extern_Constant(STATE);
76   decl_extern_Constant(TEXT);
77   decl_extern_Constant(TMPDIR);
78   decl_extern_Constant(USEDCPUTIME);
79   decl_extern_Constant(USEDDISKSIZE);
80   decl_extern_Constant(USEDRAMSIZE);
81   decl_extern_Constant(USEDWALLTIME);
82   decl_extern_Constant(USER);
83   decl_extern_Constant(WORKDIR);
84   decl_extern_Constant(HOMEDIR);
85   decl_extern_Constant(EXCLUSIVE);
86
87   // These constants define the status of a job (parameter STATE)
88   decl_extern_Constant(CREATED);
89   decl_extern_Constant(IN_PROCESS);
90   decl_extern_Constant(QUEUED);
91   decl_extern_Constant(RUNNING);
92   decl_extern_Constant(PAUSED);
93   decl_extern_Constant(FINISHED);
94   decl_extern_Constant(FAILED);
95
96 }
97
98 #endif