X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FSMESH_I%2FSMESH_Filter_i.cxx;h=36808eed4afb03715767d29fe2b77b1c906f8ec1;hb=a5a9b778aaaab382d357dc107c161190a13f7b5c;hp=46a46b18dfa5a1886bf191925ca594a07dcd2013;hpb=d547f440f838090c4aca61aa64b5f7d5b9e0aff4;p=modules%2Fsmesh.git diff --git a/src/SMESH_I/SMESH_Filter_i.cxx b/src/SMESH_I/SMESH_Filter_i.cxx index 46a46b18d..36808eed4 100644 --- a/src/SMESH_I/SMESH_Filter_i.cxx +++ b/src/SMESH_I/SMESH_Filter_i.cxx @@ -170,21 +170,21 @@ static TopoDS_Shape getShapeByID (const char* theID) return TopoDS_Shape(); } -static std::string getShapeNameByID (const char* theID) -{ - if ( theID && strlen( theID ) > 0 ) { - SMESH_Gen_i* aSMESHGen = SMESH_Gen_i::GetSMESHGen(); - SALOMEDS::Study_var aStudy = aSMESHGen->GetCurrentStudy(); - if ( !aStudy->_is_nil() ) { - SALOMEDS::SObject_wrap aSObj = aStudy->FindObjectID(theID); - if ( !aSObj->_is_nil() ) { - CORBA::String_var name = aSObj->GetName(); - return name.in(); - } - } - } - return ""; -} +// static std::string getShapeNameByID (const char* theID) +// { +// if ( theID && strlen( theID ) > 0 ) { +// SMESH_Gen_i* aSMESHGen = SMESH_Gen_i::GetSMESHGen(); +// SALOMEDS::Study_var aStudy = aSMESHGen->GetCurrentStudy(); +// if ( !aStudy->_is_nil() ) { +// SALOMEDS::SObject_wrap aSObj = aStudy->FindObjectID(theID); +// if ( !aSObj->_is_nil() ) { +// CORBA::String_var name = aSObj->GetName(); +// return name.in(); +// } +// } +// } +// return ""; +// } /* FUNCTORS @@ -510,7 +510,6 @@ FunctorType Length2D_i::GetFunctorType() SMESH::Length2D::Values* Length2D_i::GetValues() { - INFOS("Length2D_i::GetValues"); SMESH::Controls::Length2D::TValues aValues; (dynamic_cast(myFunctorPtr.get()))->GetValues( aValues ); @@ -530,7 +529,6 @@ SMESH::Length2D::Values* Length2D_i::GetValues() aValue.myPnt2 = aVal.myPntId[ 1 ]; } - INFOS("Length2D_i::GetValuess~"); return aResult._retn(); } @@ -581,7 +579,6 @@ FunctorType MultiConnection2D_i::GetFunctorType() SMESH::MultiConnection2D::Values* MultiConnection2D_i::GetValues() { - INFOS("MultiConnection2D_i::GetValues"); SMESH::Controls::MultiConnection2D::MValues aValues; (dynamic_cast(myFunctorPtr.get()))->GetValues( aValues ); @@ -601,7 +598,6 @@ SMESH::MultiConnection2D::Values* MultiConnection2D_i::GetValues() aValue.myNbConnects = (*anIter).second; } - INFOS("Multiconnection2D_i::GetValuess~"); return aResult._retn(); } @@ -839,8 +835,8 @@ BelongToGeom_i::BelongToGeom_i() BelongToGeom_i::~BelongToGeom_i() { - delete myShapeName; - delete myShapeID; + CORBA::string_free( myShapeName ); + CORBA::string_free( myShapeID ); } void BelongToGeom_i::SetGeom( GEOM::GEOM_Object_ptr theGeom ) @@ -872,18 +868,18 @@ FunctorType BelongToGeom_i::GetFunctorType() void BelongToGeom_i::SetShapeName( const char* theName ) { - delete myShapeName; - myShapeName = strdup( theName ); + CORBA::string_free( myShapeName ); + myShapeName = CORBA::string_dup( theName ); myBelongToGeomPtr->SetGeom( getShapeByName( myShapeName ) ); TPythonDump()<SetSurface( getShapeByName( myShapeName ), (SMDSAbs_ElementType)theType ); TPythonDump()<SetGeom( getShapeByName( myShapeName ) ); TPythonDump()<GetBoreders( aBorders ); @@ -1237,8 +1232,6 @@ SMESH::FreeEdges::Borders* FreeEdges_i::GetBorders() aBorder.myPnt1 = aBord.myPntId[ 0 ]; aBorder.myPnt2 = aBord.myPntId[ 1 ]; } - - INFOS("FreeEdges_i::GetBorders~"); return aResult._retn(); } @@ -1837,9 +1830,9 @@ FunctorType EqualTo_i::GetFunctorType() Class : LogicalNOT_i Description : Logical NOT predicate */ -LogicalNOT_i::LogicalNOT_i() -: myPredicate( NULL ), - myLogicalNOTPtr( new Controls::LogicalNOT() ) +LogicalNOT_i::LogicalNOT_i(): + myLogicalNOTPtr( new Controls::LogicalNOT() ), + myPredicate( NULL ) { myFunctorPtr = myPredicatePtr = myLogicalNOTPtr; } @@ -3672,7 +3665,7 @@ static LDOM_Element createFilterItem( const char* theName, //======================================================================= FilterLibrary_i::FilterLibrary_i( const char* theFileName ) { - myFileName = strdup( theFileName ); + myFileName = CORBA::string_dup( theFileName ); SMESH::FilterManager_i* aFilterMgr = new SMESH::FilterManager_i(); myFilterMgr = aFilterMgr->_this(); @@ -3713,7 +3706,7 @@ FilterLibrary_i::FilterLibrary_i() FilterLibrary_i::~FilterLibrary_i() { - delete myFileName; + CORBA::string_free( myFileName ); //TPythonDump()<