Salome HOME
updated copyright message
[modules/yacs.git] / src / ydfx_gui / YDFXResourceModel.hxx
1 // Copyright (C) 2017-2023  CEA/DEN, EDF R&D
2 //
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, or (at your option) any later version.
7 //
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.
12 //
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
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19
20 #ifndef YDFXRESOURCEMODEL_H
21 #define YDFXRESOURCEMODEL_H
22
23 #include "AbstractResourceModel.hxx"
24
25 class YACSEvalYFX;
26 class YACSEvalListOfResources;
27 class YACSEvalParamsForCluster;
28
29 class YDFXWIDGETS_EXPORT YDFXResourceModel : public AbstractResourceModel
30 {
31 public:
32     
33   YDFXResourceModel(YACSEvalYFX* eval);
34   virtual ~YDFXResourceModel();
35
36   virtual bool getParallelizeStatus()const;
37   virtual void setParallelizeStatus(bool v);
38
39   virtual std::string getRemoteDir()const;
40   virtual std::string getDefaultRemoteDir(std::string machine)const;
41   virtual void setRemoteDir(const std::string& v);
42
43   virtual std::string getLocalDir()const;
44   virtual void setLocalDir(const std::string& v);
45
46   virtual std::string getWckey()const;
47   virtual void setWckey(const std::string& v);
48
49   virtual int getMaxDurationMinutes()const;
50   virtual void setMaxDurationMinutes(int v);
51
52   virtual int getMaxDurationHours()const;
53   virtual void setMaxDurationHours(int v);
54
55   virtual unsigned int getNbprocs()const;
56   virtual void setNbprocs(unsigned int v);
57
58   virtual std::string getWantedMachine()const;
59   virtual void setWantedMachine(const std::string& v);
60   virtual std::vector<std::string> getFittingMachines()const;
61
62   virtual const std::list<std::string>& getInFiles()const;
63   virtual std::list<std::string>& getInFiles();
64
65   virtual bool isMachineInteractive(const std::string& machine)const;
66
67   void reset(YACSEvalYFX* eval);
68
69 private:
70
71   YACSEvalListOfResources * resources();
72   const YACSEvalListOfResources * resources()const;
73   YACSEvalParamsForCluster& getClusterParams();
74   const YACSEvalParamsForCluster& getClusterParams()const;
75   void getMaxDuration(int& hours, int& minutes)const;
76   void setMaxDuration(int hours, int minutes);
77
78 private:
79   YACSEvalYFX* _eval;
80 };
81
82 #endif // YDFXRESOURCEMODEL_H