Salome HOME
Copyright update 2020
[plugins/ghs3dprlplugin.git] / src / GHS3DPRLPlugin / GHS3DPRLPlugin_Hypothesis_i.cxx
old mode 100755 (executable)
new mode 100644 (file)
index 4deb488..8a3debd
@@ -1,31 +1,27 @@
-//  GHS3DPRLPlugin : C++ implementation
+// Copyright (C) 2007-2020  CEA/DEN, EDF R&D
 //
-//  Copyright (C) 2006  OPEN CASCADE, CEA/DEN, EDF R&D
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
 //
-//  This library is free software; you can redistribute it and/or
-//  modify it under the terms of the GNU Lesser General Public
-//  License as published by the Free Software Foundation; either
-//  version 2.1 of the License.
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
 //
-//  This library is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-//  Lesser General Public License for more details.
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 //
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
-//  See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
-//
-//
-// File      : GHS3DPRLPlugin_Hypothesis_i.cxx
-//  Author   : Christian VAN WAMBEKE (CEA) (from Hexotic plugin Lioka RAZAFINDRAZAKA)
-// Date      : 2007/02/01
-// Project   : SALOME
-//=============================================================================
-using namespace std;
 
+// ---
+// File   : GHS3DPRLPlugin_Hypothesis_i.cxx
+// Author : Christian VAN WAMBEKE (CEA) (from Hexotic plugin Lioka RAZAFINDRAZAKA)
+// ---
+//
 #include "GHS3DPRLPlugin_Hypothesis_i.hxx"
 #include "SMESH_Gen.hxx"
 #include "SMESH_PythonDump.hxx"
@@ -42,15 +38,13 @@ using namespace std;
 //=============================================================================
 GHS3DPRLPlugin_Hypothesis_i::
 GHS3DPRLPlugin_Hypothesis_i (PortableServer::POA_ptr thePOA,
-                           int                     theStudyId,
-                           ::SMESH_Gen*            theGenImpl)
+                             ::SMESH_Gen*            theGenImpl)
   : SALOME::GenericObj_i( thePOA ),
     SMESH_Hypothesis_i( thePOA )
 {
   MESSAGE( "GHS3DPRLPlugin_Hypothesis_i::GHS3DPRLPlugin_Hypothesis_i" );
   myBaseImpl = new ::GHS3DPRLPlugin_Hypothesis (theGenImpl->GetANewId(),
-                                              theStudyId,
-                                              theGenImpl);
+                                                theGenImpl);
 }
 
 //=============================================================================
@@ -70,6 +64,11 @@ GHS3DPRLPlugin_Hypothesis_i::~GHS3DPRLPlugin_Hypothesis_i()
  *  GHS3DPRLPlugin_Hypothesis_i::SetMEDName
  *  GHS3DPRLPlugin_Hypothesis_i::SetNbPart
  *  GHS3DPRLPlugin_Hypothesis_i::SetKeepFiles
+ *  GHS3DPRLPlugin_Hypothesis_i::SetBackground
+ *  GHS3DPRLPlugin_Hypothesis_i::SetMultithread
+ *  GHS3DPRLPlugin_Hypothesis_i::SetGradation
+ *  GHS3DPRLPlugin_Hypothesis_i::SetMinSize
+ *  GHS3DPRLPlugin_Hypothesis_i::SetMaxSize
  */
 //=============================================================================
 
@@ -78,7 +77,7 @@ void GHS3DPRLPlugin_Hypothesis_i::SetMEDName (const char *theValue)
   MESSAGE("GHS3DPRLPlugin_Hypothesis_i::SetMEDName");
   ASSERT(myBaseImpl);
   this->GetImpl()->SetMEDName(theValue);
-  SMESH::TPythonDump() << _this() << ".SetMEDName( " << theValue << " )";
+  SMESH::TPythonDump() << _this() << ".SetMEDName( '" << theValue << "' )";
 }
 
 void GHS3DPRLPlugin_Hypothesis_i::SetNbPart (CORBA::Long theValue)
@@ -97,11 +96,68 @@ void GHS3DPRLPlugin_Hypothesis_i::SetKeepFiles (CORBA::Boolean theValue)
   SMESH::TPythonDump() << _this() << ".SetKeepFiles( " << theValue << " )";
 }
 
+void GHS3DPRLPlugin_Hypothesis_i::SetBackground (CORBA::Boolean theValue)
+{
+  MESSAGE("GHS3DPRLPlugin_Hypothesis_i::SetBackground");
+  ASSERT(myBaseImpl);
+  this->GetImpl()->SetBackground(theValue);
+  SMESH::TPythonDump() << _this() << ".SetBackground( " << theValue << " )";
+}
+
+void GHS3DPRLPlugin_Hypothesis_i::SetMultithread (CORBA::Boolean theValue)
+{
+  MESSAGE("GHS3DPRLPlugin_Hypothesis_i::SetMultithread");
+  ASSERT(myBaseImpl);
+  this->GetImpl()->SetMultithread(theValue);
+  SMESH::TPythonDump() << _this() << ".SetMultithread( " << theValue << " )";
+}
+
+//void GHS3DPRLPlugin_Hypothesis_i::SetToMergeSubdomains (CORBA::Boolean theValue)
+//{
+//  MESSAGE("GHS3DPRLPlugin_Hypothesis_i::SetToMergeSubdomains");
+//  ASSERT(myBaseImpl);
+//  this->GetImpl()->SetToMergeSubdomains(theValue);
+//  SMESH::TPythonDump() << _this() << ".SetToMergeSubdomains( " << theValue << " )";
+//}
+
+void GHS3DPRLPlugin_Hypothesis_i::SetGradation (CORBA::Float theValue)
+{
+  MESSAGE("GHS3DPRLPlugin_Hypothesis_i::SetGradation");
+  ASSERT(myBaseImpl);
+  this->GetImpl()->SetGradation(theValue);
+  SMESH::TPythonDump() << _this() << ".SetGradation( " << theValue << " )";
+}
+
+void GHS3DPRLPlugin_Hypothesis_i::SetMinSize (CORBA::Float theValue)
+{
+  MESSAGE("GHS3DPRLPlugin_Hypothesis_i::SetMinSize");
+  ASSERT(myBaseImpl);
+  this->GetImpl()->SetMinSize(theValue);
+  SMESH::TPythonDump() << _this() << ".SetMinSize( " << theValue << " )";
+}
+
+void GHS3DPRLPlugin_Hypothesis_i::SetMaxSize (CORBA::Float theValue)
+{
+  MESSAGE("GHS3DPRLPlugin_Hypothesis_i::SetMaxSize");
+  ASSERT(myBaseImpl);
+  this->GetImpl()->SetMaxSize(theValue);
+  SMESH::TPythonDump() << _this() << ".SetMaxSize( " << theValue << " )";
+}
+
+
+
+
+
 //=============================================================================
 /*!
  *  GHS3DPRLPlugin_Hypothesis_i::GetMEDName
  *  GHS3DPRLPlugin_Hypothesis_i::GetNbPart
  *  GHS3DPRLPlugin_Hypothesis_i::GetKeepFiles
+ *  GHS3DPRLPlugin_Hypothesis_i::GetBackground
+ *  GHS3DPRLPlugin_Hypothesis_i::GetMultithread
+ *  GHS3DPRLPlugin_Hypothesis_i::GetGradation
+ *  GHS3DPRLPlugin_Hypothesis_i::GetMinSize
+ *  GHS3DPRLPlugin_Hypothesis_i::GetMaxSize
  */
 //=============================================================================
 
@@ -109,8 +165,8 @@ char * GHS3DPRLPlugin_Hypothesis_i::GetMEDName()
 {
   MESSAGE("GHS3DPRLPlugin_Hypothesis_i::GetMEDName");
   ASSERT(myBaseImpl);
-    CORBA::String_var c_s =
-    CORBA::string_dup(this->GetImpl()->GetMEDName().c_str());
+  CORBA::String_var c_s =
+  CORBA::string_dup(this->GetImpl()->GetMEDName().c_str());
   return c_s._retn();
 }
 
@@ -128,6 +184,62 @@ CORBA::Boolean GHS3DPRLPlugin_Hypothesis_i::GetKeepFiles()
   return this->GetImpl()->GetKeepFiles();
 }
 
+CORBA::Boolean GHS3DPRLPlugin_Hypothesis_i::GetBackground()
+{
+  MESSAGE("GHS3DPRLPlugin_Hypothesis_i::GetBackground");
+  ASSERT(myBaseImpl);
+  return this->GetImpl()->GetBackground();
+}
+
+CORBA::Boolean GHS3DPRLPlugin_Hypothesis_i::GetMultithread()
+{
+  MESSAGE("GHS3DPRLPlugin_Hypothesis_i::GetMultithread");
+  ASSERT(myBaseImpl);
+  return this->GetImpl()->GetMultithread();
+}
+
+//CORBA::Boolean GHS3DPRLPlugin_Hypothesis_i::GetToMergeSubdomains()
+//{
+//  MESSAGE("GHS3DPRLPlugin_Hypothesis_i::GetToMergeSubdomains");
+//  ASSERT(myBaseImpl);
+//  return this->GetImpl()->GetToMergeSubdomains();
+//}
+
+CORBA::Float GHS3DPRLPlugin_Hypothesis_i::GetGradation()
+{
+  MESSAGE("GHS3DPRLPlugin_Hypothesis_i::GetGradation");
+  ASSERT(myBaseImpl);
+  return this->GetImpl()->GetGradation();
+}
+
+CORBA::Float GHS3DPRLPlugin_Hypothesis_i::GetMinSize()
+{
+  MESSAGE("GHS3DPRLPlugin_Hypothesis_i::GetMinSize");
+  ASSERT(myBaseImpl);
+  return this->GetImpl()->GetMinSize();
+}
+
+CORBA::Float GHS3DPRLPlugin_Hypothesis_i::GetMaxSize()
+{
+  MESSAGE("GHS3DPRLPlugin_Hypothesis_i::GetMaxSize");
+  ASSERT(myBaseImpl);
+  return this->GetImpl()->GetMaxSize();
+}
+
+void GHS3DPRLPlugin_Hypothesis_i::SetAdvancedOption(const char* theOptAndVals )
+{
+  if ( theOptAndVals && GetImpl()->GetAdvancedOption() != theOptAndVals )
+  {
+    GetImpl()->SetAdvancedOption( theOptAndVals );
+    SMESH::TPythonDump() << _this() << ".SetAdvancedOption( '" << theOptAndVals << "' )";
+  }
+}
+
+char* GHS3DPRLPlugin_Hypothesis_i::GetAdvancedOption()
+{
+  return CORBA::string_dup( GetImpl()->GetAdvancedOption().c_str() );
+}
+
 //=============================================================================
 /*!
  *  GHS3DPRLPlugin_Hypothesis_i::GetImpl
@@ -144,8 +256,8 @@ CORBA::Boolean GHS3DPRLPlugin_Hypothesis_i::GetKeepFiles()
 //================================================================================
 /*!
  * \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
+ * \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)
  */