From b102e0bfd8022bf79f7cd7661fccea89063e189a Mon Sep 17 00:00:00 2001 From: vsr Date: Fri, 4 Mar 2011 15:48:19 +0000 Subject: [PATCH] SALOME::GenericObj : Destroy() -> UnRegister() --- src/VISUGUI/VisuGUI_ClippingDlg.cxx | 2 +- src/VISUGUI/VisuGUI_Slider.cxx | 2 +- src/VISUGUI/VisuGUI_Tools.cxx | 2 +- src/VISU_I/SALOME_GenericObjPointer.hh | 6 +++--- src/VISU_I/VISU_ColoredPrs3dCache_i.cc | 4 ++-- src/VISU_I/VISU_ColoredPrs3dFactory.hh | 2 +- src/VISU_I/VISU_ColoredPrs3dHolder_i.cc | 2 +- src/VISU_I/VISU_ColoredPrs3d_i.cc | 4 ++-- src/VISU_I/VISU_ColoredPrs3d_i.hh | 6 +++--- src/VISU_I/VISU_Prs3d_i.cc | 2 +- src/VISU_I/VISU_ResultUtils.cc | 2 +- src/VISU_I/VISU_Result_i.cc | 2 +- 12 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/VISUGUI/VisuGUI_ClippingDlg.cxx b/src/VISUGUI/VisuGUI_ClippingDlg.cxx index 076dde49..0f9bea8d 100644 --- a/src/VISUGUI/VisuGUI_ClippingDlg.cxx +++ b/src/VISUGUI/VisuGUI_ClippingDlg.cxx @@ -1240,7 +1240,7 @@ void VisuGUI_ClippingDlg::SetPrs3d(VISU::Prs3d_i* thePrs) { if(thePrs != myPrs3d){ if(myPrs3d) - myPrs3d->Destroy(); + myPrs3d->UnRegister(); if(thePrs) thePrs->Register(); myPrs3d = thePrs; diff --git a/src/VISUGUI/VisuGUI_Slider.cxx b/src/VISUGUI/VisuGUI_Slider.cxx index f479c029..8cdc11f3 100644 --- a/src/VISUGUI/VisuGUI_Slider.cxx +++ b/src/VISUGUI/VisuGUI_Slider.cxx @@ -638,7 +638,7 @@ void VisuGUI_Slider::onValueChanged( int value ) QApplication::restoreOverrideCursor(); } - aView3D->Destroy(); + aView3D->UnRegister(); updateMemoryState(); } diff --git a/src/VISUGUI/VisuGUI_Tools.cxx b/src/VISUGUI/VisuGUI_Tools.cxx index 6c6618ab..4227cc7a 100644 --- a/src/VISUGUI/VisuGUI_Tools.cxx +++ b/src/VISUGUI/VisuGUI_Tools.cxx @@ -526,7 +526,7 @@ namespace VISU // Remove aSObject together with all its sub-objects VISU::RemoveFromStudy(theSObject, false, // remove not only IOR attribute, but Object With Children - false); // not Destroy() sub-objects + false); // not UnRegister() sub-objects } } diff --git a/src/VISU_I/SALOME_GenericObjPointer.hh b/src/VISU_I/SALOME_GenericObjPointer.hh index 2af65334..dc1cad3e 100644 --- a/src/VISU_I/SALOME_GenericObjPointer.hh +++ b/src/VISU_I/SALOME_GenericObjPointer.hh @@ -57,10 +57,10 @@ namespace SALOME } void - Destroy() + UnRegister() { if(this->myPointer){ - this->myPointer->Destroy(); + this->myPointer->UnRegister(); this->myPointer = NULL; } } @@ -104,7 +104,7 @@ namespace SALOME //! Destroy smart pointer and remove the reference to its object. ~GenericObjPtr() { - this->Destroy(); + this->UnRegister(); } /*! diff --git a/src/VISU_I/VISU_ColoredPrs3dCache_i.cc b/src/VISU_I/VISU_ColoredPrs3dCache_i.cc index 532e18dd..a6e4f94d 100644 --- a/src/VISU_I/VISU_ColoredPrs3dCache_i.cc +++ b/src/VISU_I/VISU_ColoredPrs3dCache_i.cc @@ -486,7 +486,7 @@ VISU::ColoredPrs3dCache_i CORBA::String_var anIOR = GetID(); SALOMEDS::SObject_var aSObject = GetStudyDocument()->FindObjectIOR(anIOR.in()); VISU::RemoveFromStudy(aSObject, false, true); - Destroy(); + UnRegister(); } std::string @@ -526,7 +526,7 @@ VISU::ColoredPrs3dCache_i TPrs3dPtr aPrs3d(thePrs3d); myHolderMap[theHolderEntry].push_front(aPrs3d); thePrs3d->SetHolderEntry( theHolderEntry ); - thePrs3d->Destroy(); + thePrs3d->UnRegister(); } return thePrs3d; } diff --git a/src/VISU_I/VISU_ColoredPrs3dFactory.hh b/src/VISU_I/VISU_ColoredPrs3dFactory.hh index 82735358..520a69d1 100644 --- a/src/VISU_I/VISU_ColoredPrs3dFactory.hh +++ b/src/VISU_I/VISU_ColoredPrs3dFactory.hh @@ -299,7 +299,7 @@ namespace VISU SALOME::GenericObjPtr aSameColoredPrs3d(new TColoredPrs3d(thePublishInStudyMode)); Copy(theColoredPrs3d, aSameColoredPrs3d); if ( theCreateAsTemporalObject ) - aSameColoredPrs3d->Destroy(); + aSameColoredPrs3d->UnRegister(); return aSameColoredPrs3d; } }; diff --git a/src/VISU_I/VISU_ColoredPrs3dHolder_i.cc b/src/VISU_I/VISU_ColoredPrs3dHolder_i.cc index 8e6cf555..aed6e493 100644 --- a/src/VISU_I/VISU_ColoredPrs3dHolder_i.cc +++ b/src/VISU_I/VISU_ColoredPrs3dHolder_i.cc @@ -235,7 +235,7 @@ VISU::ColoredPrs3dHolder_i CORBA::String_var anIOR = GetID(); SALOMEDS::SObject_var aSObject = GetStudyDocument()->FindObjectIOR(anIOR.in()); VISU::RemoveFromStudy(aSObject, false); - Destroy(); + UnRegister(); } //---------------------------------------------------------------------------- diff --git a/src/VISU_I/VISU_ColoredPrs3d_i.cc b/src/VISU_I/VISU_ColoredPrs3d_i.cc index 3b32d82e..f0cf7047 100644 --- a/src/VISU_I/VISU_ColoredPrs3d_i.cc +++ b/src/VISU_I/VISU_ColoredPrs3d_i.cc @@ -208,9 +208,9 @@ VISU::ColoredPrs3d_i //--------------------------------------------------------------- void VISU::ColoredPrs3d_i -::Destroy() +::UnRegister() { - TSuperClass::Destroy(); + TSuperClass::UnRegister(); } //--------------------------------------------------------------- diff --git a/src/VISU_I/VISU_ColoredPrs3d_i.hh b/src/VISU_I/VISU_ColoredPrs3d_i.hh index dbae3b8b..0de865f6 100644 --- a/src/VISU_I/VISU_ColoredPrs3d_i.hh +++ b/src/VISU_I/VISU_ColoredPrs3d_i.hh @@ -62,7 +62,7 @@ namespace VISU virtual void - Destroy() = 0; + UnRegister() = 0; }; typedef SALOME::GenericObjPtr PMinMaxController; @@ -80,7 +80,7 @@ namespace VISU virtual void - Destroy() + UnRegister() { vtkObjectBase::Delete(); } @@ -122,7 +122,7 @@ namespace VISU virtual void - Destroy(); + UnRegister(); virtual void diff --git a/src/VISU_I/VISU_Prs3d_i.cc b/src/VISU_I/VISU_Prs3d_i.cc index 21a797ae..f18c8f35 100644 --- a/src/VISU_I/VISU_Prs3d_i.cc +++ b/src/VISU_I/VISU_Prs3d_i.cc @@ -425,7 +425,7 @@ VISU::Prs3d_i Execute() { //TInvokeSignalEvent::Execute(); - myRemovable->Destroy(); + myRemovable->UnRegister(); } }; diff --git a/src/VISU_I/VISU_ResultUtils.cc b/src/VISU_I/VISU_ResultUtils.cc index ea918c29..86457d7c 100644 --- a/src/VISU_I/VISU_ResultUtils.cc +++ b/src/VISU_I/VISU_ResultUtils.cc @@ -69,7 +69,7 @@ namespace VISU TResultManager ::~TResultManager() { - myResult->Destroy(); + myResult->UnRegister(); } diff --git a/src/VISU_I/VISU_Result_i.cc b/src/VISU_I/VISU_Result_i.cc index 2e80e13a..b158404c 100644 --- a/src/VISU_I/VISU_Result_i.cc +++ b/src/VISU_I/VISU_Result_i.cc @@ -220,7 +220,7 @@ VISU::Result_i Execute() { VISU::RemoveFromStudy(myRemovable->GetSObject(),false); - myRemovable->Destroy(); + myRemovable->UnRegister(); } }; -- 2.39.2