mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2025-02-03 23:40:33 +05:00
SALOME::GenericObj : Destroy() -> UnRegister()
This commit is contained in:
parent
5cfaebe1bf
commit
ac724740a9
@ -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();
|
||||
}
|
||||
|
||||
//=================================================================================
|
||||
|
@ -667,7 +667,7 @@ SMESH_Client::SMESH_Client(CORBA::ORB_ptr theORB,
|
||||
//=================================================================================
|
||||
SMESH_Client::~SMESH_Client()
|
||||
{
|
||||
myMeshServer->Destroy();
|
||||
myMeshServer->UnRegister();
|
||||
if(!mySMESHDSMesh)
|
||||
delete mySMDSMesh;
|
||||
}
|
||||
|
@ -280,7 +280,7 @@
|
||||
// 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();
|
||||
|
@ -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;
|
||||
|
@ -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 (...) {
|
||||
}
|
||||
|
@ -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();
|
||||
|
@ -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;
|
||||
|
@ -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 ) ) );
|
||||
|
@ -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
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
}
|
||||
}
|
||||
|
@ -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()";
|
||||
}
|
||||
|
||||
//=======================================================================
|
||||
|
@ -89,7 +89,7 @@ Measurements_i::Measurements_i()
|
||||
//=======================================================================
|
||||
Measurements_i::~Measurements_i()
|
||||
{
|
||||
//TPythonDump()<<this<<".Destroy()";
|
||||
//TPythonDump()<<this<<".UnRegister()";
|
||||
}
|
||||
|
||||
static bool getNodeNodeDistance (SMESH::Measure& theMeasure,
|
||||
|
@ -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();
|
||||
|
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user