Salome HOME
Copyright update 2021
[tools/libbatch.git] / src / Core / Constants.hxx
1 // Copyright (C) 2007-2021  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, or (at your option) any later version.
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 #define LIBBATCH_UNUSED(var) (void)var
43
44 namespace Batch {
45
46   // Declaration of the keys for the parameter map
47   decl_extern_Constant(ARGUMENTS);
48   decl_extern_Constant(ASSIGNEDHOSTNAMES);
49   decl_extern_Constant(EXECUTABLE);
50   decl_extern_Constant(ID);
51   decl_extern_Constant(INFILE);
52   decl_extern_Constant(MAXCPUTIME);
53   decl_extern_Constant(MAXDISKSIZE);
54   decl_extern_Constant(MAXRAMSIZE);
55   decl_extern_Constant(MAXWALLTIME);
56   decl_extern_Constant(NAME);
57   decl_extern_Constant(NBPROC);
58   decl_extern_Constant(NBPROCPERNODE);
59   decl_extern_Constant(OUTFILE);
60   decl_extern_Constant(QUEUE);
61   decl_extern_Constant(STATE);
62   decl_extern_Constant(WORKDIR);
63   decl_extern_Constant(EXCLUSIVE);
64   decl_extern_Constant(MEMPERCPU);
65   decl_extern_Constant(WCKEY);
66   decl_extern_Constant(EXTRAPARAMS);
67   decl_extern_Constant(PREPROCESS);
68   decl_extern_Constant(PARTITION);
69   decl_extern_Constant(NBNODE);
70
71   // Parameters for COORM
72   decl_extern_Constant(LAUNCHER_FILE);
73   decl_extern_Constant(LAUNCHER_ARGS);
74
75   // These constants define the status of a job (parameter STATE)
76   decl_extern_Constant(CREATED);
77   decl_extern_Constant(IN_PROCESS);
78   decl_extern_Constant(QUEUED);
79   decl_extern_Constant(RUNNING);
80   decl_extern_Constant(PAUSED);
81   decl_extern_Constant(FINISHED);
82   decl_extern_Constant(FAILED);
83
84 }
85
86 #endif