Salome HOME
Update copyright
[modules/smesh.git] / src / StdMeshers_I / StdMeshers_NumberOfSegments_i.hxx
1 // Copyright (C) 2007-2011  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 // Copyright (C) 2003-2007  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.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22
23 //  SMESH SMESH_I : idl implementation based on 'SMESH' unit's calsses
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 "SMESH_StdMeshers_I.hxx"
34
35 #include <SALOMEconfig.h>
36 #include CORBA_SERVER_HEADER(SMESH_Mesh)
37 #include CORBA_SERVER_HEADER(SMESH_BasicHypothesis)
38
39 #include "SMESH_Hypothesis_i.hxx"
40 #include "StdMeshers_NumberOfSegments.hxx"
41
42 // ======================================================
43 // Number of segments hypothesis
44 // ======================================================
45 class STDMESHERS_I_EXPORT StdMeshers_NumberOfSegments_i:
46   public virtual POA_StdMeshers::StdMeshers_NumberOfSegments,
47   public virtual SMESH_Hypothesis_i
48 {
49 public:
50   // Constructor
51   StdMeshers_NumberOfSegments_i( PortableServer::POA_ptr thePOA,
52                             int                     theStudyId,
53                             ::SMESH_Gen*            theGenImpl );
54   // Destructor
55   virtual ~StdMeshers_NumberOfSegments_i();
56
57   // Builds point distribution according to passed function
58   SMESH::double_array* BuildDistributionExpr( const char*, CORBA::Long, CORBA::Long )
59     throw ( SALOME::SALOME_Exception );
60   SMESH::double_array* BuildDistributionTab( const SMESH::double_array&, CORBA::Long, CORBA::Long )
61     throw ( SALOME::SALOME_Exception );
62
63   // Set number of segments
64   void SetNumberOfSegments( CORBA::Long theSegmentsNumber )
65     throw ( SALOME::SALOME_Exception );
66   // Get number of segments
67   CORBA::Long GetNumberOfSegments();
68
69   // Set distribution type
70   void SetDistrType(CORBA::Long typ)
71     throw ( SALOME::SALOME_Exception );
72   // Get distribution type
73   CORBA::Long GetDistrType();
74
75   // Set scalar factor
76   void SetScaleFactor( CORBA::Double theScaleFactor )
77     throw ( SALOME::SALOME_Exception );
78   // Get scalar factor
79   CORBA::Double GetScaleFactor()
80     throw ( SALOME::SALOME_Exception );
81
82   // Set table function for distribution DT_TabFunc
83   void SetTableFunction(const SMESH::double_array& table)
84     throw ( SALOME::SALOME_Exception );
85   // Get table function for distribution DT_TabFunc
86   SMESH::double_array* GetTableFunction()
87     throw ( SALOME::SALOME_Exception );
88
89   // Set expression function for distribution DT_ExprFunc
90   void SetExpressionFunction(const char* expr)
91     throw ( SALOME::SALOME_Exception );
92   // Get expression function for distribution DT_ExprFunc
93   char* GetExpressionFunction()
94     throw ( SALOME::SALOME_Exception );
95
96   // Set the exponent mode on/off
97   void SetConversionMode( CORBA::Long conv )
98     throw ( SALOME::SALOME_Exception );
99   // Returns true if the exponent mode is set
100   CORBA::Long ConversionMode()
101     throw ( SALOME::SALOME_Exception );
102
103   // Get implementation
104   ::StdMeshers_NumberOfSegments* GetImpl();
105   
106   // Verify whether hypothesis supports given entity type 
107   CORBA::Boolean IsDimSupported( SMESH::Dimension type );
108
109   //Set Reversed Edges
110   void SetReversedEdges( const SMESH::long_array& theIDs);
111
112   //Get Reversed Edges
113   SMESH::long_array*  GetReversedEdges();
114
115   //Set Object Entry
116   void SetObjectEntry( const char* entry);
117
118   //Get Object Entry
119   char* GetObjectEntry();
120 };
121
122 #endif