Salome HOME
SALOME::GenericObj : Destroy() -> UnRegister()
authorvsr <vsr@opencascade.com>
Fri, 4 Mar 2011 15:42:14 +0000 (15:42 +0000)
committervsr <vsr@opencascade.com>
Fri, 4 Mar 2011 15:42:14 +0000 (15:42 +0000)
19 files changed:
src/OBJECT/SMESH_Object.cxx
src/SMESHClient/SMESH_Client.cxx
src/SMESHGUI/SMESHGUI.cxx
src/SMESHGUI/SMESHGUI_BuildCompoundDlg.cxx
src/SMESHGUI/SMESHGUI_CopyMeshDlg.cxx
src/SMESHGUI/SMESHGUI_Hypotheses.cxx
src/SMESHGUI/SMESHGUI_Make2DFrom3DOp.cxx
src/SMESHGUI/SMESHGUI_Measurements.cxx
src/SMESHGUI/SMESHGUI_MeshOp.cxx
src/SMESHGUI/SMESHGUI_RotationDlg.cxx
src/SMESHGUI/SMESHGUI_ScaleDlg.cxx
src/SMESHGUI/SMESHGUI_SymmetryDlg.cxx
src/SMESHGUI/SMESHGUI_TranslationDlg.cxx
src/SMESH_I/SMESH_Filter_i.cxx
src/SMESH_I/SMESH_Measurements_i.cxx
src/SMESH_I/SMESH_Mesh_i.cxx
src/SMESH_SWIG/SMESH_BelongToGeom.py
src/SMESH_SWIG/SMESH_GroupLyingOnGeom.py
src/SMESH_SWIG/smeshDC.py

index 6e44e059defb5ea3af447f879556f1a9d0e3381a..ded63b7937367466310009048aa1a6f968a23a51 100644 (file)
@@ -843,7 +843,7 @@ SMESH_GroupObj::SMESH_GroupObj( SMESH::SMESH_GroupBase_ptr theGroup,
 SMESH_GroupObj::~SMESH_GroupObj()
 {
   if ( MYDEBUG ) MESSAGE("~SMESH_GroupObj");
-  myGroupServer->Destroy();
+  myGroupServer->UnRegister();
 }
 
 //=================================================================================
@@ -973,7 +973,7 @@ SMESH_subMeshObj::SMESH_subMeshObj( SMESH::SMESH_subMesh_ptr theSubMesh,
 SMESH_subMeshObj::~SMESH_subMeshObj()
 {
   if ( MYDEBUG ) MESSAGE( "~SMESH_subMeshObj" );
-  mySubMeshServer->Destroy();
+  mySubMeshServer->UnRegister();
 }
 
 //=================================================================================
index e91fd5b237c4dc4c3f281e57e20fb0b7e2b0e7bf..64fe283ef8b3000d548c952c69657d4c8cf7a369 100644 (file)
@@ -667,7 +667,7 @@ SMESH_Client::SMESH_Client(CORBA::ORB_ptr theORB,
 //=================================================================================
 SMESH_Client::~SMESH_Client()
 {
-  myMeshServer->Destroy();
+  myMeshServer->UnRegister();
   if(!mySMESHDSMesh)
     delete mySMDSMesh;
 }
index e99e2b78744bef33e93ef5af6ccd2efd761bef9f..a0f68f2faceed03439720ea0c410a60669eb8be6 100644 (file)
             // obj has been published in study. Its refcount has been incremented.
             // It is safe to decrement its refcount
             // so that it will be destroyed when the entry in study will be removed
-            aMeshes[i]->Destroy();
+            aMeshes[i]->UnRegister();
 #endif
           }
           else {
@@ -1582,8 +1582,8 @@ LightApp_Module( "SMESH" )
 SMESHGUI::~SMESHGUI()
 {
 #ifdef WITHGENERICOBJ
-  SMESH::GetFilterManager()->Destroy();
-  SMESH::GetMeasurements()->Destroy();
+  SMESH::GetFilterManager()->UnRegister();
+  SMESH::GetMeasurements()->UnRegister();
 #endif
   SMESH::GetFilterManager() = SMESH::FilterManager::_nil();
   SMESH::GetMeasurements() = SMESH::Measurements::_nil();
index 4fceb54be677148e21eec882ef2f59ca69cccbf4..3f8b26fde6f3dfaa27450f3ba9f75b14a58982de 100644 (file)
@@ -341,7 +341,7 @@ bool SMESHGUI_BuildCompoundDlg::ClickOnApply()
     // It is safe to decrement its refcount
     // so that it will be destroyed when the entry in study will be removed
     if (!CORBA::is_nil(aCompoundMesh))
-      aCompoundMesh->Destroy();
+      aCompoundMesh->UnRegister();
 #endif
 
     return true;
index f4b6950bfdfe24fa08afd7bc106457452da89958..f1a72bb64b649083d7b855054def58488747acd9 100644 (file)
@@ -338,7 +338,7 @@ bool SMESHGUI_CopyMeshDlg::ClickOnApply()
     // obj has been published in study. Its refcount has been incremented.
     // It is safe to decrement its refcount
     // so that it will be destroyed when the entry in study will be removed
-    newMesh->Destroy();
+    newMesh->UnRegister();
 #endif
   } catch (...) {
   }
index 6276d067729c2a74af05ab3b39b9fe71f254828a..e39b9cd0bd29647ca068e083cfe009c7d319a826 100644 (file)
@@ -94,7 +94,7 @@ void SMESHGUI_GenericHypothesisCreator::create( bool isAlgo,
       SMESH::CreateHypothesis( hypType(), theHypName, isAlgo );
 #ifdef WITHGENERICOBJ
     if (!CORBA::is_nil(anAlgo))
-      anAlgo->Destroy();
+      anAlgo->UnRegister();
 #endif
   }
   else {
@@ -103,7 +103,7 @@ void SMESHGUI_GenericHypothesisCreator::create( bool isAlgo,
     editHypothesis( aHypothesis.in(), theHypName, theParent, obj, slot );
 #ifdef WITHGENERICOBJ
     if (!CORBA::is_nil(aHypothesis))
-      aHypothesis->Destroy();
+      aHypothesis->UnRegister();
 #endif
   }
 }
@@ -302,7 +302,7 @@ void SMESHGUI_GenericHypothesisCreator::onDialogFinished( int result )
   }
   SMESHGUI::GetSMESHGUI()->updateObjBrowser( true, 0 );
 #ifdef WITHGENERICOBJ
-  myHypo->Destroy();
+  myHypo->UnRegister();
 #endif
   myHypo = SMESH::SMESH_Hypothesis::_nil();
   myInitParamsHypo = SMESH::SMESH_Hypothesis::_nil();
index 4ffc3f09e4d30b02b8d701cd048eca79b95b0e7a..eb8a49ba0151e4663860b6891ae1a7134b6d1240 100644 (file)
@@ -351,12 +351,12 @@ bool SMESHGUI_Make2DFrom3DOp::compute2DMesh()
                                                                   newGrp.out() );
       if ( !mesh->_is_nil() ) {
 #ifdef WITHGENERICOBJ
-        mesh->Destroy();
+        mesh->UnRegister();
 #endif
       }
       if ( !newGrp->_is_nil() ) {
 #ifdef WITHGENERICOBJ
-        newGrp->Destroy();
+        newGrp->UnRegister();
 #endif
       }
       ok = true;
index 95161c9dbbee00243e4eea1c6a7adcb7061caf00..63e451af1a653654e5b91c4dbe8645aedc90f7ac 100644 (file)
@@ -564,7 +564,7 @@ void SMESHGUI_MinDistance::compute()
     int precision = SMESHGUI::resourceMgr()->integerValue( "SMESH", "length_precision", 6 );
     SMESH::Measurements_var measure = SMESHGUI::GetSMESHGen()->CreateMeasurements();
     SMESH::Measure result = measure->MinDistance( s1.in(), s2.in() );
-    measure->Destroy();
+    measure->UnRegister();
     myDX->setText( QString::number( result.minX, precision > 0 ? 'f' : 'g', qAbs( precision ) ) );
     myDY->setText( QString::number( result.minY, precision > 0 ? 'f' : 'g', qAbs( precision ) ) );
     myDZ->setText( QString::number( result.minZ, precision > 0 ? 'f' : 'g', qAbs( precision ) ) );
@@ -1043,7 +1043,7 @@ void SMESHGUI_BoundingBox::compute()
     int precision = SMESHGUI::resourceMgr()->integerValue( "SMESH", "length_precision", 6 );
     SMESH::Measurements_var measure = SMESHGUI::GetSMESHGen()->CreateMeasurements();
     SMESH::Measure result = measure->BoundingBox( srcList.in() );
-    measure->Destroy();
+    measure->UnRegister();
     myXmin->setText( QString::number( result.minX, precision > 0 ? 'f' : 'g', qAbs( precision ) ) );
     myXmax->setText( QString::number( result.maxX, precision > 0 ? 'f' : 'g', qAbs( precision ) ) );
     myDX->setText( QString::number( result.maxX-result.minX, precision > 0 ? 'f' : 'g', qAbs( precision ) ) );
index 1e314d04557ddd4df5d07da3fab159c9d6e9889d..70334610ee8b33277cc73cd6ccd6ea3408dc6a23 100644 (file)
@@ -1062,7 +1062,7 @@ void SMESHGUI_MeshOp::createHypothesis(const int theDim,
       SMESH::CreateHypothesis(theTypeName, aHypName, false);
 #ifdef WITHGENERICOBJ
     if (!CORBA::is_nil(aHyp))
-      aHyp->Destroy();
+      aHyp->UnRegister();
 #endif
   } else {
     // Get hypotheses creator client (GUI)
@@ -1138,7 +1138,7 @@ void SMESHGUI_MeshOp::createHypothesis(const int theDim,
        SMESH::CreateHypothesis(theTypeName, aHypName, false);
 #ifdef WITHGENERICOBJ
      if (!CORBA::is_nil(aHyp))
-       aHyp->Destroy();
+       aHyp->UnRegister();
 #endif
     }
   }
@@ -1612,7 +1612,7 @@ bool SMESHGUI_MeshOp::createMesh( QString& theMess )
     // It is safe to decrement its refcount
     // so that it will be destroyed when the entry in study will be removed
     if (aMeshSO)
-      aMeshVar->Destroy();
+      aMeshVar->UnRegister();
 #endif
   }
   return true;
@@ -1875,7 +1875,7 @@ SMESH::SMESH_Hypothesis_var SMESHGUI_MeshOp::getAlgo( const int theDim )
           SMESH::CreateHypothesis(aHypName, aHypName, true);
 #ifdef WITHGENERICOBJ
         if (!CORBA::is_nil(aHyp))
-          aHyp->Destroy();
+          aHyp->UnRegister();
 #endif
       }
       else
@@ -1893,7 +1893,7 @@ SMESH::SMESH_Hypothesis_var SMESHGUI_MeshOp::getAlgo( const int theDim )
             SMESH::CreateHypothesis(aHypName, aHypName, true);
 #ifdef WITHGENERICOBJ
           if (!CORBA::is_nil(aHyp))
-            aHyp->Destroy();
+            aHyp->UnRegister();
 #endif
         }
       }
index 7e2f2af840827724eb549d49cd2b9eeef32436c4..46d8ba53cac52343a6c65e758aef9c33b152059f 100644 (file)
@@ -453,7 +453,7 @@ bool SMESHGUI_RotationDlg::ClickOnApply()
           // obj has been published in study. Its refcount has been incremented.
           // It is safe to decrement its refcount
           // so that it will be destroyed when the entry in study will be removed
-          mesh->Destroy();
+          mesh->UnRegister();
 #endif
         }
         break;
index fc275baaa22f095e5a1812dccc24e8cfbb84475c..f7b636e7de5e2c56e151133efbe5fb30c4136fdc 100644 (file)
@@ -504,7 +504,7 @@ bool SMESHGUI_ScaleDlg::ClickOnApply()
           // obj has been published in study. Its refcount has been incremented.
           // It is safe to decrement its refcount
           // so that it will be destroyed when the entry in study will be removed
-          mesh->Destroy();
+          mesh->UnRegister();
 #endif
         }
         break;
index 13823588803fdf781480a8a532fe0c786495a370..e0abb8cc1628ec9c57678d5134eef89afb25240b 100644 (file)
@@ -540,7 +540,7 @@ bool SMESHGUI_SymmetryDlg::ClickOnApply()
           // obj has been published in study. Its refcount has been incremented.
           // It is safe to decrement its refcount
           // so that it will be destroyed when the entry in study will be removed
-          mesh->Destroy();
+          mesh->UnRegister();
 #endif
         }
         break;
index 14a5866e07b927de5d5e2bdee0335ed91d71cf1e..601550ecbc1050549d42ad9150e03de3ee6f5b02 100644 (file)
@@ -526,7 +526,7 @@ bool SMESHGUI_TranslationDlg::ClickOnApply()
           // obj has been published in study. Its refcount has been incremented.
           // It is safe to decrement its refcount
           // so that it will be destroyed when the entry in study will be removed
-          mesh->Destroy();
+          mesh->UnRegister();
 #endif
         }
       }
index f222d8db617dbdfeefe91610f299c2c0d53c4ff6..d798596f0de909204d84f08a214b246079fc8f6a 100644 (file)
@@ -573,7 +573,7 @@ Functor_i::Functor_i():
 
 Functor_i::~Functor_i()
 {
-  //TPythonDump()<<this<<".Destroy()";
+  //TPythonDump()<<this<<".UnRegister()";
 }
 
 void Functor_i::SetMesh( SMESH_Mesh_ptr theMesh )
@@ -1619,7 +1619,7 @@ Comparator_i::Comparator_i():
 Comparator_i::~Comparator_i()
 {
   if ( myNumericalFunctor )
-    myNumericalFunctor->Destroy();
+    myNumericalFunctor->UnRegister();
 }
 
 void Comparator_i::SetMargin( CORBA::Double theValue )
@@ -1636,7 +1636,7 @@ CORBA::Double Comparator_i::GetMargin()
 void Comparator_i::SetNumFunctor( NumericalFunctor_ptr theFunct )
 {
   if ( myNumericalFunctor )
-    myNumericalFunctor->Destroy();
+    myNumericalFunctor->UnRegister();
 
   myNumericalFunctor = DownCast<NumericalFunctor_i*>(theFunct);
 
@@ -1731,13 +1731,13 @@ LogicalNOT_i::LogicalNOT_i()
 LogicalNOT_i::~LogicalNOT_i()
 {
   if ( myPredicate )
-    myPredicate->Destroy();
+    myPredicate->UnRegister();
 }
 
 void LogicalNOT_i::SetPredicate( Predicate_ptr thePredicate )
 {
   if ( myPredicate )
-    myPredicate->Destroy();
+    myPredicate->UnRegister();
 
   myPredicate = SMESH::GetPredicate(thePredicate);
 
@@ -1771,10 +1771,10 @@ LogicalBinary_i::LogicalBinary_i()
 LogicalBinary_i::~LogicalBinary_i()
 {
   if ( myPredicate1 )
-    myPredicate1->Destroy();
+    myPredicate1->UnRegister();
 
   if ( myPredicate2 )
-    myPredicate2->Destroy();
+    myPredicate2->UnRegister();
 }
 
 void LogicalBinary_i::SetMesh( SMESH_Mesh_ptr theMesh )
@@ -1789,7 +1789,7 @@ void LogicalBinary_i::SetMesh( SMESH_Mesh_ptr theMesh )
 void LogicalBinary_i::SetPredicate1( Predicate_ptr thePredicate )
 {
   if ( myPredicate1 )
-    myPredicate1->Destroy();
+    myPredicate1->UnRegister();
 
   myPredicate1 = SMESH::GetPredicate(thePredicate);
 
@@ -1803,7 +1803,7 @@ void LogicalBinary_i::SetPredicate1( Predicate_ptr thePredicate )
 void LogicalBinary_i::SetPredicate2( Predicate_ptr thePredicate )
 {
   if ( myPredicate2 )
-    myPredicate2->Destroy();
+    myPredicate2->UnRegister();
 
   myPredicate2 = SMESH::GetPredicate(thePredicate);
 
@@ -1876,7 +1876,7 @@ FilterManager_i::FilterManager_i()
 
 FilterManager_i::~FilterManager_i()
 {
-  //TPythonDump()<<this<<".Destroy()";
+  //TPythonDump()<<this<<".UnRegister()";
 }
 
 
@@ -2267,12 +2267,12 @@ Filter_i::Filter_i()
 Filter_i::~Filter_i()
 {
   if ( myPredicate )
-    myPredicate->Destroy();
+    myPredicate->UnRegister();
 
   if(!CORBA::is_nil(myMesh))
-    myMesh->Destroy();
+    myMesh->UnRegister();
 
-  //TPythonDump()<<this<<".Destroy()";
+  //TPythonDump()<<this<<".UnRegister()";
 }
 
 //=======================================================================
@@ -2282,7 +2282,7 @@ Filter_i::~Filter_i()
 void Filter_i::SetPredicate( Predicate_ptr thePredicate )
 {
   if ( myPredicate )
-    myPredicate->Destroy();
+    myPredicate->UnRegister();
 
   myPredicate = SMESH::GetPredicate(thePredicate);
 
@@ -2315,7 +2315,7 @@ SetMesh( SMESH_Mesh_ptr theMesh )
     theMesh->Register();
 
   if(!CORBA::is_nil(myMesh))
-    myMesh->Destroy();
+    myMesh->UnRegister();
 
   myMesh = SMESH_Mesh::_duplicate( theMesh );
   TPythonDump()<<this<<".SetMesh("<<theMesh<<")";
@@ -2722,7 +2722,7 @@ CORBA::Boolean Filter_i::GetCriteria( SMESH::Filter::Criteria_out theCriteria )
 CORBA::Boolean Filter_i::SetCriteria( const SMESH::Filter::Criteria& theCriteria )
 {
   if ( myPredicate != 0 )
-    myPredicate->Destroy();
+    myPredicate->UnRegister();
 
   SMESH::FilterManager_i* aFilter = new SMESH::FilterManager_i();
   FilterManager_ptr aFilterMgr = aFilter->_this();
@@ -3421,7 +3421,7 @@ FilterLibrary_i::FilterLibrary_i()
 FilterLibrary_i::~FilterLibrary_i()
 {
   delete myFileName;
-  //TPythonDump()<<this<<".Destroy()";
+  //TPythonDump()<<this<<".UnRegister()";
 }
 
 //=======================================================================
index 2cd41f7640e3073cc55747e050b54174343a930e..4afdf34f3662363c9ab7c04a5d785db12707f8d9 100644 (file)
@@ -89,7 +89,7 @@ Measurements_i::Measurements_i()
 //=======================================================================
 Measurements_i::~Measurements_i()
 {
-  //TPythonDump()<<this<<".Destroy()";
+  //TPythonDump()<<this<<".UnRegister()";
 }
 
 static bool getNodeNodeDistance (SMESH::Measure& theMeasure,
index 1019e527302c08ddba0b3588f0e0a09a2d49c205..a088cce96db094346ec184926c181c892ce13fe8 100644 (file)
@@ -132,7 +132,7 @@ SMESH_Mesh_i::~SMESH_Mesh_i()
       // this method is called from destructor of group (PAL6331)
       //_impl->RemoveGroup( aGroup->GetLocalID() );
       aGroup->myMeshServant = 0;
-      aGroup->Destroy();
+      aGroup->UnRegister();
     }
   }
   _mapGroups.clear();
@@ -144,7 +144,7 @@ SMESH_Mesh_i::~SMESH_Mesh_i()
       continue;
     SMESH_subMesh_i* aSubMesh = dynamic_cast<SMESH_subMesh_i*>(SMESH_Gen_i::GetServant(itSM->second).in());
     if (aSubMesh) {
-      aSubMesh->Destroy();
+      aSubMesh->UnRegister();
     }
   }
   _mapSubMeshIor.clear();
@@ -156,7 +156,7 @@ SMESH_Mesh_i::~SMESH_Mesh_i()
       continue;
     SMESH_Hypothesis_i* aHypo = dynamic_cast<SMESH_Hypothesis_i*>(SMESH_Gen_i::GetServant(itH->second).in());
     if (aHypo) {
-      aHypo->Destroy();
+      aHypo->UnRegister();
     }
   }
   _mapHypo.clear();
index af6c984205dd2ab4d32c67c415f979045f06d3d0..0a3eeed03d2b5d75bb46a42c8c13c570c4a2c703 100644 (file)
@@ -40,7 +40,7 @@ def CheckBelongToGeomFilterOld(theMeshGen, theMesh, theShape, theSubShape, theEl
     aBelongToGeom.SetElementType(theElemType)
     
     aFilter.SetPredicate(aBelongToGeom)
-    aFilterMgr.Destroy()
+    aFilterMgr.UnRegister()
     return aFilter.GetElementsId(theMesh)
 
 ## Current style
index c90a3bd8979996f94d85151fca90e4fa058ef8c4..12db16e5512f5299cc3f73566d63f2873871da9b 100644 (file)
@@ -36,7 +36,7 @@ def BuildGroupLyingOn(theMesh, theElemType, theName, theShape):
     
     aFilter.SetPredicate(aLyingOnGeom)
     anIds = aFilter.GetElementsId(theMesh)
-    aFilterMgr.Destroy()
+    aFilterMgr.UnRegister()
 
     aGroup = theMesh.CreateGroup(theElemType, theName)
     aGroup.Add(anIds)
index a5dce4df87e8f919fb2f6a386958c7a2a6ef76cd..d8e94dbfa0895c14a60e21b459b55960011a499d 100644 (file)
@@ -884,7 +884,7 @@ class smeshDC(SMESH._objref_SMESH_Gen):
         aCriteria = []
         aCriteria.append(aCriterion)
         aFilter.SetCriteria(aCriteria)
-        aFilterMgr.Destroy()
+        aFilterMgr.UnRegister()
         return aFilter
 
     ## Creates a numerical functor by its type
@@ -1009,7 +1009,7 @@ class smeshDC(SMESH._objref_SMESH_Gen):
             pass
         aMeasurements = self.CreateMeasurements()
         result = aMeasurements.MinDistance(src1, src2)
-        aMeasurements.Destroy()
+        aMeasurements.UnRegister()
         return result
 
     ## Get bounding box of the specified object(s)
@@ -1046,7 +1046,7 @@ class smeshDC(SMESH._objref_SMESH_Gen):
             pass
         aMeasurements = self.CreateMeasurements()
         result = aMeasurements.BoundingBox(srclist)
-        aMeasurements.Destroy()
+        aMeasurements.UnRegister()
         return result
 
 import omniORB
@@ -1807,7 +1807,7 @@ class Mesh:
         aCriteria.append(Criterion)
         aFilter.SetCriteria(aCriteria)
         group = self.MakeGroupByFilter(groupName, aFilter)
-        aFilterMgr.Destroy()
+        aFilterMgr.UnRegister()
         return group
 
     ## Creates a mesh group by the given criteria (list of criteria)
@@ -1820,7 +1820,7 @@ class Mesh:
         aFilter = aFilterMgr.CreateFilter()
         aFilter.SetCriteria(theCriteria)
         group = self.MakeGroupByFilter(groupName, aFilter)
-        aFilterMgr.Destroy()
+        aFilterMgr.UnRegister()
         return group
 
     ## Creates a mesh group by the given filter
@@ -1851,7 +1851,7 @@ class Mesh:
         aPredicate = aFilterMgr.CreateFreeEdges()
         aPredicate.SetMesh(self.mesh)
         aBorders = aPredicate.GetBorders()
-        aFilterMgr.Destroy()
+        aFilterMgr.UnRegister()
         return aBorders
 
     ## Removes a group
@@ -2415,7 +2415,7 @@ class Mesh:
 
         aMeasurements = self.smeshpyD.CreateMeasurements()
         aMeasure = aMeasurements.MinDistance(id1, id2)
-        aMeasurements.Destroy()
+        aMeasurements.UnRegister()
         return aMeasure
 
     ## Get bounding box of the specified object(s)
@@ -2464,7 +2464,7 @@ class Mesh:
             pass
         aMeasurements = self.smeshpyD.CreateMeasurements()
         aMeasure = aMeasurements.BoundingBox(srclist)
-        aMeasurements.Destroy()
+        aMeasurements.UnRegister()
         return aMeasure
 
     # Mesh edition (SMESH_MeshEditor functionality):