Salome HOME
updated copyright message
[plugins/netgenplugin.git] / src / NETGENPlugin / NETGENPlugin_Hypothesis_i.cxx
index 52866026af63fbf08b30ec3500c32bfbc56ac00a..dbd3cb122d23117b1a3a55f29d3b61989b02b6f7 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2019  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2023  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -60,7 +60,7 @@ bool NETGENPlugin_Hypothesis_i::isToSetParameter<double>(double curValue,
 NETGENPlugin_Hypothesis_i::
 NETGENPlugin_Hypothesis_i (PortableServer::POA_ptr thePOA,
                            ::SMESH_Gen*            theGenImpl)
-  : SALOME::GenericObj_i( thePOA ), 
+  : SALOME::GenericObj_i( thePOA ),
     SMESH_Hypothesis_i( thePOA ),
     mySetMethodFlags(0)
 {
@@ -337,7 +337,6 @@ CORBA::Double NETGENPlugin_Hypothesis_i::GetChordalError()
 
 void NETGENPlugin_Hypothesis_i::SetLocalSizeOnShape(GEOM::GEOM_Object_ptr GeomObj,
                                                     CORBA::Double         localSize)
-  throw (SALOME::SALOME_Exception)
 {
   string entry;
   entry = GeomObj->GetStudyEntry();
@@ -374,7 +373,7 @@ NETGENPlugin::string_array* NETGENPlugin_Hypothesis_i::GetLocalSizeEntries()
   NETGENPlugin::string_array_var result = new NETGENPlugin::string_array();
   const ::NETGENPlugin_Hypothesis::TLocalSize localSizes =
     this->GetImpl()->GetLocalSizesAndEntries();
-  result->length(localSizes.size());
+  result->length((CORBA::ULong) localSizes.size());
   ::NETGENPlugin_Hypothesis::TLocalSize::const_iterator it = localSizes.begin();
   for (int i=0 ; it != localSizes.end() ; i++, it++)
     {
@@ -472,7 +471,7 @@ CORBA::Boolean NETGENPlugin_Hypothesis_i::GetFuseEdges()
 
 //=======================================================================
 //function : SetNbSurfOptSteps
-//purpose  : 
+//purpose  :
 //=======================================================================
 
 void NETGENPlugin_Hypothesis_i::SetNbSurfOptSteps(CORBA::Short nb )
@@ -491,12 +490,12 @@ void NETGENPlugin_Hypothesis_i::SetNbSurfOptSteps(CORBA::Short nb )
 
 CORBA::Short NETGENPlugin_Hypothesis_i::GetNbSurfOptSteps()
 {
-  return GetImpl()->GetNbSurfOptSteps();
+  return (CORBA::Short) GetImpl()->GetNbSurfOptSteps();
 }
 
 //=======================================================================
 //function : SetNbVolOptSteps
-//purpose  : 
+//purpose  :
 //=======================================================================
 
 void NETGENPlugin_Hypothesis_i::SetNbVolOptSteps(CORBA::Short nb )
@@ -516,12 +515,12 @@ void NETGENPlugin_Hypothesis_i::SetNbVolOptSteps(CORBA::Short nb )
 
 CORBA::Short NETGENPlugin_Hypothesis_i::GetNbVolOptSteps()
 {
-  return GetImpl()->GetNbVolOptSteps();
+  return (CORBA::Short) GetImpl()->GetNbVolOptSteps();
 }
 
 //=======================================================================
 //function : SetElemSizeWeight
-//purpose  : 
+//purpose  :
 //=======================================================================
 
 void NETGENPlugin_Hypothesis_i::SetElemSizeWeight(CORBA::Double size )
@@ -545,7 +544,7 @@ CORBA::Double NETGENPlugin_Hypothesis_i::GetElemSizeWeight()
 
 //=======================================================================
 //function : SetWorstElemMeasure
-//purpose  : 
+//purpose  :
 //=======================================================================
 
 void NETGENPlugin_Hypothesis_i::SetWorstElemMeasure(CORBA::Short val )
@@ -559,17 +558,41 @@ void NETGENPlugin_Hypothesis_i::SetWorstElemMeasure(CORBA::Short val )
 
 //=======================================================================
 //function : GetWorstElemMeasure
-//purpose  : 
+//purpose  :
 //=======================================================================
 
 CORBA::Short NETGENPlugin_Hypothesis_i::GetWorstElemMeasure()
 {
-  return GetImpl()->GetWorstElemMeasure();
+  return (CORBA::Short) GetImpl()->GetWorstElemMeasure();
+}
+
+//=======================================================================
+//function : SetNbThreads
+//purpose  :
+//=======================================================================
+
+void NETGENPlugin_Hypothesis_i::SetNbThreads(CORBA::Short val )
+{
+  if ( GetNbThreads() != val )
+  {
+    this->GetImpl()->SetNbThreads( val );
+    SMESH::TPythonDump() << _this() << ".SetNbThreads( " << SMESH::TVar(val) << " )";
+  }
+}
+
+//=======================================================================
+//function : GetNbThreads
+//purpose  :
+//=======================================================================
+
+CORBA::Short NETGENPlugin_Hypothesis_i::GetNbThreads()
+{
+  return (CORBA::Short) GetImpl()->GetNbThreads();
 }
 
 //=======================================================================
 //function : SetUseDelauney
-//purpose  : 
+//purpose  :
 //=======================================================================
 
 void NETGENPlugin_Hypothesis_i::SetUseDelauney(CORBA::Boolean toUse)
@@ -583,7 +606,7 @@ void NETGENPlugin_Hypothesis_i::SetUseDelauney(CORBA::Boolean toUse)
 
 //=======================================================================
 //function : GetUseDelauney
-//purpose  : 
+//purpose  :
 //=======================================================================
 
 CORBA::Boolean NETGENPlugin_Hypothesis_i::GetUseDelauney()
@@ -593,7 +616,7 @@ CORBA::Boolean NETGENPlugin_Hypothesis_i::GetUseDelauney()
 
 //=======================================================================
 //function : SetCheckOverlapping
-//purpose  : 
+//purpose  :
 //=======================================================================
 
 void NETGENPlugin_Hypothesis_i::SetCheckOverlapping(CORBA::Boolean toCheck )
@@ -607,7 +630,7 @@ void NETGENPlugin_Hypothesis_i::SetCheckOverlapping(CORBA::Boolean toCheck )
 
 //=======================================================================
 //function : GetCheckOverlapping
-//purpose  : 
+//purpose  :
 //=======================================================================
 
 CORBA::Boolean NETGENPlugin_Hypothesis_i::GetCheckOverlapping()
@@ -617,7 +640,7 @@ CORBA::Boolean NETGENPlugin_Hypothesis_i::GetCheckOverlapping()
 
 //=======================================================================
 //function : SetCheckChartBoundary
-//purpose  : 
+//purpose  :
 //=======================================================================
 
 void NETGENPlugin_Hypothesis_i::SetCheckChartBoundary(CORBA::Boolean toCheck )
@@ -653,13 +676,13 @@ CORBA::Boolean NETGENPlugin_Hypothesis_i::GetCheckChartBoundary()
 
 //================================================================================
 /*!
- * \brief Verify whether hypothesis supports given entity type 
+ * \brief Verify whether hypothesis supports given entity type
   * \param type - dimension (see SMESH::Dimension enumeration)
   * \retval CORBA::Boolean - TRUE if dimension is supported, FALSE otherwise
- * 
+ *
  * Verify whether hypothesis supports given entity type (see SMESH::Dimension enumeration)
  */
-//================================================================================  
+//================================================================================
 CORBA::Boolean NETGENPlugin_Hypothesis_i::IsDimSupported( SMESH::Dimension type )
 {
   return type == SMESH::DIM_3D;
@@ -712,7 +735,7 @@ std::string NETGENPlugin_Hypothesis_i::getMethodOfParameter(const int paramIndex
 
 bool
 NETGENPlugin_Hypothesis_i::getObjectsDependOn( std::vector< std::string > & entryArray,
-                                               std::vector< int >         & subIDArray ) const
+                                               std::vector< int >         & /*subIDArray*/ ) const
 {
   typedef ::NETGENPlugin_Hypothesis THyp;
 
@@ -734,7 +757,7 @@ NETGENPlugin_Hypothesis_i::getObjectsDependOn( std::vector< std::string > & entr
 
 bool
 NETGENPlugin_Hypothesis_i::setObjectsDependOn( std::vector< std::string > & entryArray,
-                                               std::vector< int >         & subIDArray )
+                                               std::vector< int >         & /*subIDArray*/ )
 {
   typedef ::NETGENPlugin_Hypothesis THyp;