Salome HOME
Merge multi-study removal branch.
[modules/smesh.git] / src / StdMeshers_I / StdMeshers_NumberOfSegments_i.hxx
1 // Copyright (C) 2007-2016  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, or (at your option) any later version.
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 //
29 #ifndef _SMESH_NUMBEROFSEGMENTS_I_HXX_
30 #define _SMESH_NUMBEROFSEGMENTS_I_HXX_
31
32 #include "SMESH_StdMeshers_I.hxx"
33
34 #include <SALOMEconfig.h>
35 #include CORBA_SERVER_HEADER(SMESH_Mesh)
36 #include CORBA_SERVER_HEADER(SMESH_BasicHypothesis)
37
38 #include "SMESH_Hypothesis_i.hxx"
39 #include "StdMeshers_NumberOfSegments.hxx"
40
41 // ======================================================
42 // Number of segments hypothesis
43 // ======================================================
44 class STDMESHERS_I_EXPORT StdMeshers_NumberOfSegments_i:
45   public virtual POA_StdMeshers::StdMeshers_NumberOfSegments,
46   public virtual SMESH_Hypothesis_i
47 {
48 public:
49   // Constructor
50   StdMeshers_NumberOfSegments_i( PortableServer::POA_ptr thePOA,
51                                  ::SMESH_Gen*            theGenImpl );
52   // Destructor
53   virtual ~StdMeshers_NumberOfSegments_i();
54
55   // Builds point distribution according to passed function
56   SMESH::double_array* BuildDistributionExpr( const char*, CORBA::Long, CORBA::Long )
57     throw ( SALOME::SALOME_Exception );
58   SMESH::double_array* BuildDistributionTab( const SMESH::double_array&, CORBA::Long, CORBA::Long )
59     throw ( SALOME::SALOME_Exception );
60
61   // Set number of segments
62   void SetNumberOfSegments( CORBA::Long theSegmentsNumber )
63     throw ( SALOME::SALOME_Exception );
64   // Get number of segments
65   CORBA::Long GetNumberOfSegments();
66
67   // Set distribution type
68   void SetDistrType(CORBA::Long typ)
69     throw ( SALOME::SALOME_Exception );
70   // Get distribution type
71   CORBA::Long GetDistrType();
72
73   // Set scalar factor
74   void SetScaleFactor( CORBA::Double theScaleFactor )
75     throw ( SALOME::SALOME_Exception );
76   // Get scalar factor
77   CORBA::Double GetScaleFactor()
78     throw ( SALOME::SALOME_Exception );
79
80   // Set table function for distribution DT_TabFunc
81   void SetTableFunction(const SMESH::double_array& table)
82     throw ( SALOME::SALOME_Exception );
83   // Get table function for distribution DT_TabFunc
84   SMESH::double_array* GetTableFunction()
85     throw ( SALOME::SALOME_Exception );
86
87   // Set expression function for distribution DT_ExprFunc
88   void SetExpressionFunction(const char* expr)
89     throw ( SALOME::SALOME_Exception );
90   // Get expression function for distribution DT_ExprFunc
91   char* GetExpressionFunction()
92     throw ( SALOME::SALOME_Exception );
93
94   // Set the exponent mode on/off
95   void SetConversionMode( CORBA::Long conv )
96     throw ( SALOME::SALOME_Exception );
97   // Returns true if the exponent mode is set
98   CORBA::Long ConversionMode()
99     throw ( SALOME::SALOME_Exception );
100
101   // Get implementation
102   ::StdMeshers_NumberOfSegments* GetImpl();
103   
104   // Verify whether hypothesis supports given entity type 
105   CORBA::Boolean IsDimSupported( SMESH::Dimension type );
106
107   //Set Reversed Edges
108   void SetReversedEdges( const SMESH::long_array& theIDs);
109
110   //Get Reversed Edges
111   SMESH::long_array*  GetReversedEdges();
112
113   //Set Object Entry
114   void SetObjectEntry( const char* entry);
115
116   //Get Object Entry
117   char* GetObjectEntry();
118
119  protected:
120   virtual std::string getMethodOfParameter(const int paramIndex, int nbVars) const;
121 };
122
123 #endif