Version: 8.3.0
StdMeshers_NumberOfSegments_i.hxx
Go to the documentation of this file.
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"
40 
41 // ======================================================
42 // Number of segments hypothesis
43 // ======================================================
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  int theStudyId,
52  ::SMESH_Gen* theGenImpl );
53  // Destructor
55 
56  // Builds point distribution according to passed function
57  SMESH::double_array* BuildDistributionExpr( const char*, CORBA::Long, CORBA::Long )
58  throw ( SALOME::SALOME_Exception );
59  SMESH::double_array* BuildDistributionTab( const SMESH::double_array&, CORBA::Long, CORBA::Long )
60  throw ( SALOME::SALOME_Exception );
61 
62  // Set number of segments
63  void SetNumberOfSegments( CORBA::Long theSegmentsNumber )
64  throw ( SALOME::SALOME_Exception );
65  // Get number of segments
66  CORBA::Long GetNumberOfSegments();
67 
68  // Set distribution type
69  void SetDistrType(CORBA::Long typ)
70  throw ( SALOME::SALOME_Exception );
71  // Get distribution type
72  CORBA::Long GetDistrType();
73 
74  // Set scalar factor
75  void SetScaleFactor( CORBA::Double theScaleFactor )
76  throw ( SALOME::SALOME_Exception );
77  // Get scalar factor
78  CORBA::Double GetScaleFactor()
79  throw ( SALOME::SALOME_Exception );
80 
81  // Set table function for distribution DT_TabFunc
82  void SetTableFunction(const SMESH::double_array& table)
83  throw ( SALOME::SALOME_Exception );
84  // Get table function for distribution DT_TabFunc
85  SMESH::double_array* GetTableFunction()
86  throw ( SALOME::SALOME_Exception );
87 
88  // Set expression function for distribution DT_ExprFunc
89  void SetExpressionFunction(const char* expr)
90  throw ( SALOME::SALOME_Exception );
91  // Get expression function for distribution DT_ExprFunc
92  char* GetExpressionFunction()
93  throw ( SALOME::SALOME_Exception );
94 
95  // Set the exponent mode on/off
96  void SetConversionMode( CORBA::Long conv )
97  throw ( SALOME::SALOME_Exception );
98  // Returns true if the exponent mode is set
99  CORBA::Long ConversionMode()
100  throw ( SALOME::SALOME_Exception );
101 
102  // Get implementation
104 
105  // Verify whether hypothesis supports given entity type
106  CORBA::Boolean IsDimSupported( SMESH::Dimension type );
107 
108  //Set Reversed Edges
109  void SetReversedEdges( const SMESH::long_array& theIDs);
110 
111  //Get Reversed Edges
112  SMESH::long_array* GetReversedEdges();
113 
114  //Set Object Entry
115  void SetObjectEntry( const char* entry);
116 
117  //Get Object Entry
118  char* GetObjectEntry();
119 
120  protected:
121  virtual std::string getMethodOfParameter(const int paramIndex, int nbVars) const;
122 };
123 
124 #endif