Salome HOME
Imported using TkCVS
[plugins/ghs3dprlplugin.git] / src / GHS3DPRLPlugin / GHS3DPRLPlugin_Hypothesis.hxx
1 //  GHS3DPRLPlugin : C++ implementation
2 //
3 //  Copyright (C) 2006  OPEN CASCADE, CEA/DEN, EDF R&D
4 //
5 //  This library is free software; you can redistribute it and/or
6 //  modify it under the terms of the GNU Lesser General Public
7 //  License as published by the Free Software Foundation; either
8 //  version 2.1 of the License.
9 //
10 //  This library is distributed in the hope that it will be useful,
11 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
12 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13 //  Lesser General Public License for more details.
14 //
15 //  You should have received a copy of the GNU Lesser General Public
16 //  License along with this library; if not, write to the Free Software
17 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
18 //
19 //  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
20 //
21 //
22 // File      : GHS3DPRLPlugin_Hypothesis.hxx
23 // Author    : Christian VAN WAMBEKE (CEA) (from Hexotic plugin Lioka RAZAFINDRAZAKA)
24 // Date      : 2007/02/01
25 // Project   : SALOME
26 // $Header   :
27 //=============================================================================
28
29 #ifndef _GHS3DPRLPlugin_Hypothesis_HXX_
30 #define _GHS3DPRLPlugin_Hypothesis_HXX_
31
32 #include "SMESH_Hypothesis.hxx"
33 #include "Utils_SALOME_Exception.hxx"
34
35 //  Parameters for work of GHS3DPRL
36 //
37
38 class GHS3DPRLPlugin_Hypothesis: public SMESH_Hypothesis
39 {
40 public:
41
42   GHS3DPRLPlugin_Hypothesis(int hypId, int studyId, SMESH_Gen * gen);
43
44   void SetMEDName(string theVal);
45   string GetMEDName() const { return _MEDName; }
46
47   void SetNbPart(int theVal);
48   int GetNbPart() const { return _NbPart; }
49
50   void SetKeepFiles(bool theVal);
51   bool GetKeepFiles() const { return _KeepFiles; }
52
53   // the parameters default values
54
55   static string GetDefaultMEDName();
56   static int GetDefaultNbPart();
57   static bool GetDefaultKeepFiles();
58
59   // Persistence
60   virtual ostream & SaveTo(ostream & save);
61   virtual istream & LoadFrom(istream & load);
62   friend ostream & operator <<(ostream & save, GHS3DPRLPlugin_Hypothesis & hyp);
63   friend istream & operator >>(istream & load, GHS3DPRLPlugin_Hypothesis & hyp);
64
65   /*!
66    * \brief Does nothing
67    * \param theMesh - the built mesh
68    * \param theShape - the geometry of interest
69    * \retval bool - always false
70    */
71   virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh, const TopoDS_Shape& theShape);
72
73 private:
74   int   _countSubMesh;
75   int   _countTotal;
76   int   _nodeRefNumber;
77
78   string  _MEDName;  //generic path/name of med files
79   int   _NbPart;     //number of partitions
80   bool  _KeepFiles;   //keep intermediates tepal files or not
81 };
82
83 #endif