Salome HOME
da37f075558f96e9b9112996f9fcf0f4d6c63e06
[modules/smesh.git] / src / StdMeshers / StdMeshers_QuadrangleParams.hxx
1 //  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
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.
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 //  SMESH SMESH : implementaion of SMESH idl descriptions
21 //  File   : StdMeshers_QuadrangleParams.hxx
22 //  Author : Sergey KUUL, OCC
23 //  Module : SMESH
24 //
25 #ifndef _SMESH_QUADRANGLEPARAMS_HXX_
26 #define _SMESH_QUADRANGLEPARAMS_HXX_
27
28
29
30 #include "SMESH_StdMeshers.hxx"
31
32 #include "SMESH_Hypothesis.hxx"
33 #include "Utils_SALOME_Exception.hxx"
34
35 class STDMESHERS_EXPORT StdMeshers_QuadrangleParams:
36   public SMESH_Hypothesis
37 {
38 public:
39   StdMeshers_QuadrangleParams(int hypId, int studyId, SMESH_Gen* gen);
40   virtual ~StdMeshers_QuadrangleParams();
41
42   void SetTriaVertex(int id);
43
44   void SetObjectEntry( const char* entry ) { _objEntry = entry; }
45
46   const char* GetObjectEntry() { return _objEntry.c_str(); }
47
48   int GetTriaVertex() const { return _triaVertexID; }
49
50   virtual std::ostream & SaveTo(std::ostream & save);
51   virtual std::istream & LoadFrom(std::istream & load);
52   friend std::ostream& operator << (std::ostream & save,
53                                     StdMeshers_QuadrangleParams & hyp);
54   friend std::istream& operator >> (std::istream & load,
55                                     StdMeshers_QuadrangleParams & hyp);
56
57   /*!
58    * \brief Initialize start and end length by the mesh built on the geometry
59     * \param theMesh - the built mesh
60     * \param theShape - the geometry of interest
61     * \retval bool - true if parameter values have been successfully defined
62    */
63   virtual bool SetParametersByMesh(const SMESH_Mesh* theMesh,
64                                    const TopoDS_Shape& theShape);
65
66   /*!
67    * \brief Initialize my parameter values by default parameters.
68    *  \retval bool - true if parameter values have been successfully defined
69    */
70   virtual bool SetParametersByDefaults(const TDefaults& dflts,
71                                        const SMESH_Mesh* theMesh=0);
72
73 protected:
74   int         _triaVertexID;
75   std::string _objEntry;
76 };
77
78 #endif