From: ptv Date: Tue, 27 Jun 2006 11:46:26 +0000 (+0000) Subject: move registration of servant in POA ( SMESH_Gen_i::GetPOA()->activate_object( aServan... X-Git-Tag: LAST_STABLE_VERSION_21_09_2006_ON_3_2_0~20 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=20ed825b55dc07655f354e8d0074bf2ef2826e03;p=modules%2Fsmesh.git move registration of servant in POA ( SMESH_Gen_i::GetPOA()->activate_object( aServant ) ) from constructor of abstract class into specific methods of functor and filter manager creation. --- diff --git a/src/SMESH_I/SMESH_Filter_i.cxx b/src/SMESH_I/SMESH_Filter_i.cxx index 0a95dfff0..0b0b72ed2 100644 --- a/src/SMESH_I/SMESH_Filter_i.cxx +++ b/src/SMESH_I/SMESH_Filter_i.cxx @@ -452,8 +452,11 @@ static char* getShapeNameByID ( const char* theID ) Functor_i::Functor_i(): SALOME::GenericObj_i( SMESH_Gen_i::GetPOA() ) { - PortableServer::ObjectId_var anObjectId = - SMESH_Gen_i::GetPOA()->activate_object( this ); + // registration moved from constructor of abstract class + // to each ::Create* (creation of specific fucntor instance) + // to register fully declared this instance. + //PortableServer::ObjectId_var anObjectId = + // SMESH_Gen_i::GetPOA()->activate_object( this ); } Functor_i::~Functor_i() @@ -1417,8 +1420,11 @@ FunctorType LogicalOR_i::GetFunctorType() FilterManager_i::FilterManager_i() : SALOME::GenericObj_i( SMESH_Gen_i::GetPOA() ) { - PortableServer::ObjectId_var anObjectId = - SMESH_Gen_i::GetPOA()->activate_object( this ); + // registration moved from constructor of abstract class + // to each ::Create* (creation of specific fucntor instance) + // to register fully declared this instance. + //PortableServer::ObjectId_var anObjectId = + // SMESH_Gen_i::GetPOA()->activate_object( this ); } @@ -1431,6 +1437,7 @@ FilterManager_i::~FilterManager_i() MinimumAngle_ptr FilterManager_i::CreateMinimumAngle() { SMESH::MinimumAngle_i* aServant = new SMESH::MinimumAngle_i(); + SMESH_Gen_i::GetPOA()->activate_object( aServant ); SMESH::MinimumAngle_var anObj = aServant->_this(); TPythonDump()<activate_object( aServant ); SMESH::AspectRatio_var anObj = aServant->_this(); TPythonDump()<activate_object( aServant ); SMESH::AspectRatio3D_var anObj = aServant->_this(); TPythonDump()<activate_object( aServant ); SMESH::Warping_var anObj = aServant->_this(); TPythonDump()<activate_object( aServant ); SMESH::Taper_var anObj = aServant->_this(); TPythonDump()<activate_object( aServant ); SMESH::Skew_var anObj = aServant->_this(); TPythonDump()<activate_object( aServant ); SMESH::Area_var anObj = aServant->_this(); TPythonDump()<activate_object( aServant ); SMESH::Volume3D_var anObj = aServant->_this(); TPythonDump()<activate_object( aServant ); SMESH::Length_var anObj = aServant->_this(); TPythonDump()<activate_object( aServant ); SMESH::Length2D_var anObj = aServant->_this(); TPythonDump()<activate_object( aServant ); SMESH::MultiConnection_var anObj = aServant->_this(); TPythonDump()<activate_object( aServant ); SMESH::MultiConnection2D_var anObj = aServant->_this(); TPythonDump()<activate_object( aServant ); SMESH::BelongToGeom_var anObj = aServant->_this(); TPythonDump()<activate_object( aServant ); SMESH::BelongToPlane_var anObj = aServant->_this(); TPythonDump()<activate_object( aServant ); SMESH::BelongToCylinder_var anObj = aServant->_this(); TPythonDump()<activate_object( aServant ); SMESH::LyingOnGeom_var anObj = aServant->_this(); TPythonDump()<activate_object( aServant ); SMESH::FreeBorders_var anObj = aServant->_this(); TPythonDump()<activate_object( aServant ); SMESH::FreeEdges_var anObj = aServant->_this(); TPythonDump()<activate_object( aServant ); SMESH::RangeOfIds_var anObj = aServant->_this(); TPythonDump()<activate_object( aServant ); SMESH::BadOrientedVolume_var anObj = aServant->_this(); TPythonDump()<activate_object( aServant ); SMESH::LessThan_var anObj = aServant->_this(); TPythonDump()<activate_object( aServant ); SMESH::MoreThan_var anObj = aServant->_this(); TPythonDump()<activate_object( aServant ); SMESH::EqualTo_var anObj = aServant->_this(); TPythonDump()<activate_object( aServant ); SMESH::LogicalNOT_var anObj = aServant->_this(); TPythonDump()<activate_object( aServant ); SMESH::LogicalAND_var anObj = aServant->_this(); TPythonDump()<activate_object( aServant ); SMESH::LogicalOR_var anObj = aServant->_this(); TPythonDump()<activate_object( aServant ); SMESH::Filter_var anObj = aServant->_this(); TPythonDump()<activate_object( aServant ); SMESH::FilterLibrary_var anObj = aServant->_this(); TPythonDump()<activate_object( aServant ); SMESH::FilterLibrary_var anObj = aServant->_this(); TPythonDump()<activate_object( aFilter ); SMESH::FilterManager_var anObj = aFilter->_this(); return anObj._retn(); } @@ -1987,6 +2023,7 @@ CORBA::Boolean Filter_i::SetCriteria( const SMESH::Filter::Criteria& theCriteria myPredicate->Destroy(); SMESH::FilterManager_i* aFilter = new SMESH::FilterManager_i(); + SMESH_Gen_i::GetPOA()->activate_object( aFilter ); FilterManager_ptr aFilterMgr = aFilter->_this(); // CREATE two lists ( PREDICATES and LOG OP ) @@ -2538,6 +2575,7 @@ FilterLibrary_i::FilterLibrary_i( const char* theFileName ) { myFileName = strdup( theFileName ); SMESH::FilterManager_i* aFilterMgr = new SMESH::FilterManager_i(); + SMESH_Gen_i::GetPOA()->activate_object( aFilterMgr ); myFilterMgr = aFilterMgr->_this(); LDOMParser aParser; @@ -2570,6 +2608,7 @@ FilterLibrary_i::FilterLibrary_i() { myFileName = 0; SMESH::FilterManager_i* aFilter = new SMESH::FilterManager_i(); + SMESH_Gen_i::GetPOA()->activate_object( aFilter ); myFilterMgr = aFilter->_this(); myDoc = LDOM_Document::createDocument( LDOMString() );