Salome HOME
Remove warnings
[modules/kernel.git] / src / Batch / Batch_Parametre.hxx
index 125611351c694c94f1fca33677cd3a610f15fdaa..c572a73bfea7fc2464b81eed761312f39a6ca0d0 100644 (file)
@@ -1,21 +1,23 @@
-// Copyright (C) 2005  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
-// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
-// 
-// This library is free software; you can redistribute it and/or
-// modify it under the terms of the GNU Lesser General Public
-// License as published by the Free Software Foundation; either 
-// version 2.1 of the License.
-// 
-// This library is distributed in the hope that it will be useful 
-// but WITHOUT ANY WARRANTY; without even the implied warranty of 
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
-// Lesser General Public License for more details.
+//  Copyright (C) 2007-2008  CEA/DEN, EDF R&D, OPEN CASCADE
 //
-// You should have received a copy of the GNU Lesser General Public  
-// License along with this library; if not, write to the Free Software 
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//  Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+//  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
 //
-// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+//  This library is free software; you can redistribute it and/or
+//  modify it under the terms of the GNU Lesser General Public
+//  License as published by the Free Software Foundation; either
+//  version 2.1 of the License.
+//
+//  This library is distributed in the hope that it will be useful,
+//  but WITHOUT ANY WARRANTY; without even the implied warranty of
+//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+//  Lesser General Public License for more details.
+//
+//  You should have received a copy of the GNU Lesser General Public
+//  License along with this library; if not, write to the Free Software
+//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+//
+//  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 /*
  * Parametre.hxx : 
 #ifndef _PARAMETRE_H_
 #define _PARAMETRE_H_
 
-using namespace std;
+#include "Batch_Defines.hxx"
+
 #include <map>
 #include <string>
 #include "Batch_InvalidKeyException.hxx"
 #include "Batch_Versatile.hxx"
 
-
 // Ces macros permettent de simplifier l'ajout de nouvelles
 // clefs dans la map Parametre
 // TODO : remplacer ce mecanisme statique par la lecture
 // TODO : d'une descrption dans un fichier exterieur (genre XML)
 
-#define def_extern_MapKey(mk) extern const string & mk;
-#define def_static_MapKey(mk) const string Batch::Parametre::mk(#mk);  \
-  const string & mk = Batch::Parametre::mk;
+#define def_extern_MapKey(mk) extern BATCH_EXPORT const std::string & mk;
+#define def_static_MapKey(mk) const std::string Batch::Parametre::mk(#mk);     \
+  const std::string & mk = Batch::Parametre::mk;
 
 namespace Batch {
 
-  class Parametre : public map< string, Versatile >
+  class BATCH_EXPORT Parametre : public std::map< std::string, Versatile >
   {
   public:
     // Constructeur standard
     Parametre();
 
     // Constructeur par recopie
-    Parametre::Parametre(const Parametre & PM);
+    Parametre(const Parametre & PM);
 
     // Operateur de recherche dans la map
-    Versatile & operator [] (const string &);
-    const Versatile & operator [] (const string &) const;
+    Versatile & operator [] (const std::string &);
+    const Versatile & operator [] (const std::string &) const;
 
     // Operateur d'affectation
     Parametre & operator =(const Parametre & PM);
 
     // Declarations statique des clefs de la map
     // TODO : supprimer les declarations statiques des clefs de la map
-    static const string ACCOUNT;
-    static const string ARGUMENTS;
-    static const string CHECKPOINT;
-    static const string CKPTINTERVAL;
-    static const string CREATIONTIME;
-    static const string EGROUP;
-    static const string ELIGIBLETIME;
-    static const string ENDTIME;
-    static const string EUSER;
-    static const string EXECUTABLE;
-    static const string EXECUTIONHOST;
-    static const string EXITCODE;
-    static const string HOLD;
-    static const string ID;
-    static const string INFILE;
-    static const string MAIL;
-    static const string MAXCPUTIME;
-    static const string MAXDISKSIZE;
-    static const string MAXRAMSIZE;
-    static const string MAXWALLTIME;
-    static const string MODIFICATIONTIME;
-    static const string NAME;
-    static const string NBPROC;
-    static const string OUTFILE;
-    static const string PID;
-    static const string QUEUE;
-    static const string QUEUEDTIME;
-    static const string SERVER;
-    static const string STARTTIME;
-    static const string STATE;
-    static const string TEXT;
-    static const string TMPDIR;
-    static const string USEDCPUTIME;
-    static const string USEDDISKSIZE;
-    static const string USEDRAMSIZE;
-    static const string USEDWALLTIME;
-    static const string USER;
-    static const string WORKDIR;
+    static const std::string ACCOUNT;
+    static const std::string ARGUMENTS;
+    static const std::string CHECKPOINT;
+    static const std::string CKPTINTERVAL;
+    static const std::string CREATIONTIME;
+    static const std::string EGROUP;
+    static const std::string ELIGIBLETIME;
+    static const std::string ENDTIME;
+    static const std::string EUSER;
+    static const std::string EXECUTABLE;
+    static const std::string EXECUTIONHOST;
+    static const std::string EXITCODE;
+    static const std::string HOLD;
+    static const std::string ID;
+    static const std::string INFILE;
+    static const std::string MAIL;
+    static const std::string MAXCPUTIME;
+    static const std::string MAXDISKSIZE;
+    static const std::string MAXRAMSIZE;
+    static const std::string MAXWALLTIME;
+    static const std::string MODIFICATIONTIME;
+    static const std::string NAME;
+    static const std::string NBPROC;
+    static const std::string OUTFILE;
+    static const std::string PID;
+    static const std::string QUEUE;
+    static const std::string QUEUEDTIME;
+    static const std::string SERVER;
+    static const std::string STARTTIME;
+    static const std::string STATE;
+    static const std::string TEXT;
+    static const std::string TMPDIR;
+    static const std::string USEDCPUTIME;
+    static const std::string USEDDISKSIZE;
+    static const std::string USEDRAMSIZE;
+    static const std::string USEDWALLTIME;
+    static const std::string USER;
+    static const std::string WORKDIR;
+    static const std::string HOMEDIR;
 
   protected:
-    map< string, TypeParam > TypeMap; // map interne servant a controler le type de la valeur associee a chaque clef
+    std::map< std::string, TypeParam > TypeMap; // map interne servant a controler le type de la valeur associee a chaque clef
 
   private:
 
@@ -151,5 +154,6 @@ def_extern_MapKey(USEDRAMSIZE);
 def_extern_MapKey(USEDWALLTIME);
 def_extern_MapKey(USER);
 def_extern_MapKey(WORKDIR);
+def_extern_MapKey(HOMEDIR);
 
 #endif