Salome HOME
IsDimSupported method added
[modules/smesh.git] / src / StdMeshers_I / StdMeshers_NumberOfSegments_i.hxx
1 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
2 //
3 //  Copyright (C) 2003  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. 
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.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org 
21 //
22 //
23 //
24 //  File   : StdMeshers_NumberOfSegments_i.hxx
25 //           Moved here from SMESH_NumberOfSegments_i.hxx
26 //  Author : Paul RASCLE, EDF
27 //  Module : SMESH
28 //  $Header$
29
30 #ifndef _SMESH_NUMBEROFSEGMENTS_I_HXX_
31 #define _SMESH_NUMBEROFSEGMENTS_I_HXX_
32
33 #include <SALOMEconfig.h>
34 #include CORBA_SERVER_HEADER(SMESH_Mesh)
35 #include CORBA_SERVER_HEADER(SMESH_BasicHypothesis)
36
37 #include "SMESH_Hypothesis_i.hxx"
38 #include "StdMeshers_NumberOfSegments.hxx"
39
40 // ======================================================
41 // Number of segments hypothesis
42 // ======================================================
43 class StdMeshers_NumberOfSegments_i:
44   public virtual POA_StdMeshers::StdMeshers_NumberOfSegments,
45   public virtual SMESH_Hypothesis_i
46 {
47 public:
48   // Constructor
49   StdMeshers_NumberOfSegments_i( PortableServer::POA_ptr thePOA,
50                             int                     theStudyId,
51                             ::SMESH_Gen*            theGenImpl );
52   // Destructor
53   virtual ~StdMeshers_NumberOfSegments_i();
54
55   // Set number of segments
56   void SetNumberOfSegments( CORBA::Long theSegmentsNumber )
57     throw ( SALOME::SALOME_Exception );
58   // Get number of segments
59   CORBA::Long GetNumberOfSegments();
60
61   // Set distribution type
62   void SetDistrType(CORBA::Long typ)
63     throw ( SALOME::SALOME_Exception );
64   // Get distribution type
65   CORBA::Long GetDistrType();
66
67   // Set scalar factor
68   void SetScaleFactor( CORBA::Double theScaleFactor )
69     throw ( SALOME::SALOME_Exception );
70   // Get scalar factor
71   CORBA::Double GetScaleFactor()
72     throw ( SALOME::SALOME_Exception );
73
74   // Set table function for distribution DT_TabFunc
75   void SetTableFunction(const SMESH::double_array& table)
76     throw ( SALOME::SALOME_Exception );
77   // Get table function for distribution DT_TabFunc
78   SMESH::double_array* GetTableFunction()
79     throw ( SALOME::SALOME_Exception );
80
81   // Set expression function for distribution DT_ExprFunc
82   void SetExpressionFunction(const char* expr)
83     throw ( SALOME::SALOME_Exception );
84   // Get expression function for distribution DT_ExprFunc
85   char* GetExpressionFunction()
86     throw ( SALOME::SALOME_Exception );
87
88   // Set the exponent mode on/off
89   void SetExponentMode(CORBA::Boolean isExp)
90     throw ( SALOME::SALOME_Exception );
91   // Returns true if the exponent mode is set
92   CORBA::Boolean IsExponentMode()
93     throw ( SALOME::SALOME_Exception );
94
95   // Get implementation
96   ::StdMeshers_NumberOfSegments* GetImpl();
97   
98   // Verify whether hypothesis supports given entity type 
99   CORBA::Boolean IsDimSupported( SMESH::Dimension type );
100 };
101
102 #endif