Functor_i::Functor_i():
SALOME::GenericObj_i( SMESH_Gen_i::GetPOA() )
{
- // 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()
FilterManager_i::FilterManager_i()
: SALOME::GenericObj_i( SMESH_Gen_i::GetPOA() )
{
- // 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 );
}
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()<<aServant<<" = "<<this<<".CreateMinimumAngle()";
return anObj._retn();
AspectRatio_ptr FilterManager_i::CreateAspectRatio()
{
SMESH::AspectRatio_i* aServant = new SMESH::AspectRatio_i();
- SMESH_Gen_i::GetPOA()->activate_object( aServant );
SMESH::AspectRatio_var anObj = aServant->_this();
TPythonDump()<<aServant<<" = "<<this<<".CreateAspectRatio()";
return anObj._retn();
AspectRatio3D_ptr FilterManager_i::CreateAspectRatio3D()
{
SMESH::AspectRatio3D_i* aServant = new SMESH::AspectRatio3D_i();
- SMESH_Gen_i::GetPOA()->activate_object( aServant );
SMESH::AspectRatio3D_var anObj = aServant->_this();
TPythonDump()<<aServant<<" = "<<this<<".CreateAspectRatio3D()";
return anObj._retn();
Warping_ptr FilterManager_i::CreateWarping()
{
SMESH::Warping_i* aServant = new SMESH::Warping_i();
- SMESH_Gen_i::GetPOA()->activate_object( aServant );
SMESH::Warping_var anObj = aServant->_this();
TPythonDump()<<aServant<<" = "<<this<<".CreateWarping()";
return anObj._retn();
Taper_ptr FilterManager_i::CreateTaper()
{
SMESH::Taper_i* aServant = new SMESH::Taper_i();
- SMESH_Gen_i::GetPOA()->activate_object( aServant );
SMESH::Taper_var anObj = aServant->_this();
TPythonDump()<<aServant<<" = "<<this<<".CreateTaper()";
return anObj._retn();
Skew_ptr FilterManager_i::CreateSkew()
{
SMESH::Skew_i* aServant = new SMESH::Skew_i();
- SMESH_Gen_i::GetPOA()->activate_object( aServant );
SMESH::Skew_var anObj = aServant->_this();
TPythonDump()<<aServant<<" = "<<this<<".CreateSkew()";
return anObj._retn();
Area_ptr FilterManager_i::CreateArea()
{
SMESH::Area_i* aServant = new SMESH::Area_i();
- SMESH_Gen_i::GetPOA()->activate_object( aServant );
SMESH::Area_var anObj = aServant->_this();
TPythonDump()<<aServant<<" = "<<this<<".CreateArea()";
return anObj._retn();
Volume3D_ptr FilterManager_i::CreateVolume3D()
{
SMESH::Volume3D_i* aServant = new SMESH::Volume3D_i();
- SMESH_Gen_i::GetPOA()->activate_object( aServant );
SMESH::Volume3D_var anObj = aServant->_this();
TPythonDump()<<aServant<<" = "<<this<<".CreateVolume3D()";
return anObj._retn();
Length_ptr FilterManager_i::CreateLength()
{
SMESH::Length_i* aServant = new SMESH::Length_i();
- SMESH_Gen_i::GetPOA()->activate_object( aServant );
SMESH::Length_var anObj = aServant->_this();
TPythonDump()<<aServant<<" = "<<this<<".CreateLength()";
return anObj._retn();
Length2D_ptr FilterManager_i::CreateLength2D()
{
SMESH::Length2D_i* aServant = new SMESH::Length2D_i();
- SMESH_Gen_i::GetPOA()->activate_object( aServant );
SMESH::Length2D_var anObj = aServant->_this();
TPythonDump()<<aServant<<" = "<<this<<".CreateLength2D()";
return anObj._retn();
MultiConnection_ptr FilterManager_i::CreateMultiConnection()
{
SMESH::MultiConnection_i* aServant = new SMESH::MultiConnection_i();
- SMESH_Gen_i::GetPOA()->activate_object( aServant );
SMESH::MultiConnection_var anObj = aServant->_this();
TPythonDump()<<aServant<<" = "<<this<<".CreateMultiConnection()";
return anObj._retn();
MultiConnection2D_ptr FilterManager_i::CreateMultiConnection2D()
{
SMESH::MultiConnection2D_i* aServant = new SMESH::MultiConnection2D_i();
- SMESH_Gen_i::GetPOA()->activate_object( aServant );
SMESH::MultiConnection2D_var anObj = aServant->_this();
TPythonDump()<<aServant<<" = "<<this<<".CreateMultiConnection2D()";
return anObj._retn();
BelongToGeom_ptr FilterManager_i::CreateBelongToGeom()
{
SMESH::BelongToGeom_i* aServant = new SMESH::BelongToGeom_i();
- SMESH_Gen_i::GetPOA()->activate_object( aServant );
SMESH::BelongToGeom_var anObj = aServant->_this();
TPythonDump()<<aServant<<" = "<<this<<".CreateBelongToGeom()";
return anObj._retn();
BelongToPlane_ptr FilterManager_i::CreateBelongToPlane()
{
SMESH::BelongToPlane_i* aServant = new SMESH::BelongToPlane_i();
- SMESH_Gen_i::GetPOA()->activate_object( aServant );
SMESH::BelongToPlane_var anObj = aServant->_this();
TPythonDump()<<aServant<<" = "<<this<<".CreateBelongToPlane()";
return anObj._retn();
BelongToCylinder_ptr FilterManager_i::CreateBelongToCylinder()
{
SMESH::BelongToCylinder_i* aServant = new SMESH::BelongToCylinder_i();
- SMESH_Gen_i::GetPOA()->activate_object( aServant );
SMESH::BelongToCylinder_var anObj = aServant->_this();
TPythonDump()<<aServant<<" = "<<this<<".CreateBelongToCylinder()";
return anObj._retn();
LyingOnGeom_ptr FilterManager_i::CreateLyingOnGeom()
{
SMESH::LyingOnGeom_i* aServant = new SMESH::LyingOnGeom_i();
- SMESH_Gen_i::GetPOA()->activate_object( aServant );
SMESH::LyingOnGeom_var anObj = aServant->_this();
TPythonDump()<<aServant<<" = "<<this<<".CreateLyingOnGeom()";
return anObj._retn();
FreeBorders_ptr FilterManager_i::CreateFreeBorders()
{
SMESH::FreeBorders_i* aServant = new SMESH::FreeBorders_i();
- SMESH_Gen_i::GetPOA()->activate_object( aServant );
SMESH::FreeBorders_var anObj = aServant->_this();
TPythonDump()<<aServant<<" = "<<this<<".CreateFreeBorders()";
return anObj._retn();
FreeEdges_ptr FilterManager_i::CreateFreeEdges()
{
SMESH::FreeEdges_i* aServant = new SMESH::FreeEdges_i();
- SMESH_Gen_i::GetPOA()->activate_object( aServant );
SMESH::FreeEdges_var anObj = aServant->_this();
TPythonDump()<<aServant<<" = "<<this<<".CreateFreeEdges()";
return anObj._retn();
RangeOfIds_ptr FilterManager_i::CreateRangeOfIds()
{
SMESH::RangeOfIds_i* aServant = new SMESH::RangeOfIds_i();
- SMESH_Gen_i::GetPOA()->activate_object( aServant );
SMESH::RangeOfIds_var anObj = aServant->_this();
TPythonDump()<<aServant<<" = "<<this<<".CreateRangeOfIds()";
return anObj._retn();
BadOrientedVolume_ptr FilterManager_i::CreateBadOrientedVolume()
{
SMESH::BadOrientedVolume_i* aServant = new SMESH::BadOrientedVolume_i();
- SMESH_Gen_i::GetPOA()->activate_object( aServant );
SMESH::BadOrientedVolume_var anObj = aServant->_this();
TPythonDump()<<aServant<<" = "<<this<<".CreateBadOrientedVolume()";
return anObj._retn();
LessThan_ptr FilterManager_i::CreateLessThan()
{
SMESH::LessThan_i* aServant = new SMESH::LessThan_i();
- SMESH_Gen_i::GetPOA()->activate_object( aServant );
SMESH::LessThan_var anObj = aServant->_this();
TPythonDump()<<aServant<<" = "<<this<<".CreateLessThan()";
return anObj._retn();
MoreThan_ptr FilterManager_i::CreateMoreThan()
{
SMESH::MoreThan_i* aServant = new SMESH::MoreThan_i();
- SMESH_Gen_i::GetPOA()->activate_object( aServant );
SMESH::MoreThan_var anObj = aServant->_this();
TPythonDump()<<aServant<<" = "<<this<<".CreateMoreThan()";
return anObj._retn();
EqualTo_ptr FilterManager_i::CreateEqualTo()
{
SMESH::EqualTo_i* aServant = new SMESH::EqualTo_i();
- SMESH_Gen_i::GetPOA()->activate_object( aServant );
SMESH::EqualTo_var anObj = aServant->_this();
TPythonDump()<<aServant<<" = "<<this<<".CreateEqualTo()";
return anObj._retn();
LogicalNOT_ptr FilterManager_i::CreateLogicalNOT()
{
SMESH::LogicalNOT_i* aServant = new SMESH::LogicalNOT_i();
- SMESH_Gen_i::GetPOA()->activate_object( aServant );
SMESH::LogicalNOT_var anObj = aServant->_this();
TPythonDump()<<aServant<<" = "<<this<<".CreateLogicalNOT()";
return anObj._retn();
LogicalAND_ptr FilterManager_i::CreateLogicalAND()
{
SMESH::LogicalAND_i* aServant = new SMESH::LogicalAND_i();
- SMESH_Gen_i::GetPOA()->activate_object( aServant );
SMESH::LogicalAND_var anObj = aServant->_this();
TPythonDump()<<aServant<<" = "<<this<<".CreateLogicalAND()";
return anObj._retn();
LogicalOR_ptr FilterManager_i::CreateLogicalOR()
{
SMESH::LogicalOR_i* aServant = new SMESH::LogicalOR_i();
- SMESH_Gen_i::GetPOA()->activate_object( aServant );
SMESH::LogicalOR_var anObj = aServant->_this();
TPythonDump()<<aServant<<" = "<<this<<".CreateLogicalOR()";
return anObj._retn();
Filter_ptr FilterManager_i::CreateFilter()
{
SMESH::Filter_i* aServant = new SMESH::Filter_i();
- SMESH_Gen_i::GetPOA()->activate_object( aServant );
SMESH::Filter_var anObj = aServant->_this();
TPythonDump()<<aServant<<" = "<<this<<".CreateFilter()";
return anObj._retn();
FilterLibrary_ptr FilterManager_i::LoadLibrary( const char* aFileName )
{
SMESH::FilterLibrary_i* aServant = new SMESH::FilterLibrary_i( aFileName );
- SMESH_Gen_i::GetPOA()->activate_object( aServant );
SMESH::FilterLibrary_var anObj = aServant->_this();
TPythonDump()<<aServant<<" = "<<this<<".LoadLibrary("<<aFileName<<")";
return anObj._retn();
FilterLibrary_ptr FilterManager_i::CreateLibrary()
{
SMESH::FilterLibrary_i* aServant = new SMESH::FilterLibrary_i();
- SMESH_Gen_i::GetPOA()->activate_object( aServant );
SMESH::FilterLibrary_var anObj = aServant->_this();
TPythonDump()<<aServant<<" = "<<this<<".CreateLibrary()";
return anObj._retn();
SMESH::FilterManager_ptr SMESH_Gen_i::CreateFilterManager()
{
SMESH::FilterManager_i* aFilter = new SMESH::FilterManager_i();
- SMESH_Gen_i::GetPOA()->activate_object( aFilter );
SMESH::FilterManager_var anObj = aFilter->_this();
return anObj._retn();
}
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 )
{
myFileName = strdup( theFileName );
SMESH::FilterManager_i* aFilterMgr = new SMESH::FilterManager_i();
- SMESH_Gen_i::GetPOA()->activate_object( aFilterMgr );
myFilterMgr = aFilterMgr->_this();
LDOMParser aParser;
{
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() );
if(MYDEBUG) MESSAGE("Create Hypothesis " << theHypName);
myHypothesis_i =
myHypCreatorMap[string(theHypName)]->Create (myPoa, GetCurrentStudyID(), &myGen);
- // _CS_gbo Explicit activation (no longer made in the constructor).
- myHypothesis_i->Activate();
myHypothesis_i->SetLibName(aPlatformLibName/*theLibName*/); // for persistency assurance
}
catch (SALOME_Exception& S_ex)
if ( myImpl ) {
string hypname = string( myHyp->GetName() );
string libname = string( myHyp->GetLibName() );
- int id = myStudyContext->findId( string( GetORB()->object_to_string( anObject ) ) );
+ CORBA::String_var objStr = GetORB()->object_to_string( anObject );
+ int id = myStudyContext->findId( string( objStr.in() ) );
string hypdata = string( myImpl->SaveTo() );
// for each hypothesis create HDF group basing on its id
if ( myImpl ) {
string hypname = string( myHyp->GetName() );
string libname = string( myHyp->GetLibName() );
- int id = myStudyContext->findId( string( GetORB()->object_to_string( anObject ) ) );
+ CORBA::String_var objStr = GetORB()->object_to_string( anObject );
+ int id = myStudyContext->findId( string( objStr.in() ) );
string hypdata = string( myImpl->SaveTo() );
// for each algorithm create HDF group basing on its id
if ( !myMesh->_is_nil() ) {
SMESH_Mesh_i* myImpl = dynamic_cast<SMESH_Mesh_i*>( GetServant( myMesh ).in() );
if ( myImpl ) {
- int id = myStudyContext->findId( string( GetORB()->object_to_string( anObject ) ) );
+ CORBA::String_var objStr = GetORB()->object_to_string( anObject );
+ int id = myStudyContext->findId( string( objStr.in() ) );
::SMESH_Mesh& myLocMesh = myImpl->GetImpl();
SMESHDS_Mesh* mySMESHDSMesh = myLocMesh.GetMeshDS();
//string myRefOnObject = myRefOnHyp->GetID();
CORBA::Object_var anObject = SObjectToObject( myRefOnHyp );
- int id = myStudyContext->findId( string( GetORB()->object_to_string( anObject ) ) );
+ CORBA::String_var objStr = GetORB()->object_to_string( anObject );
+ int id = myStudyContext->findId( string( objStr.in() ) );
//if ( myRefOnObject.length() > 0 ) {
//aSize[ 0 ] = myRefOnObject.length() + 1;
char hypName[ 30 ], hypId[ 30 ];
//string myRefOnObject = myRefOnAlgo->GetID();
CORBA::Object_var anObject = SObjectToObject( myRefOnAlgo );
- int id = myStudyContext->findId( string( GetORB()->object_to_string( anObject ) ) );
+ CORBA::String_var objStr = GetORB()->object_to_string( anObject );
+ int id = myStudyContext->findId( string( objStr.in() ) );
//if ( myRefOnObject.length() > 0 ) {
//aSize[ 0 ] = myRefOnObject.length() + 1;
char algoName[ 30 ], algoId[ 30 ];
if ( !CORBA::is_nil( anSubObject ))
{
SMESH::SMESH_subMesh_var mySubMesh = SMESH::SMESH_subMesh::_narrow( anSubObject ) ;
- int subid = myStudyContext->findId( string( GetORB()->object_to_string( anSubObject ) ) );
+ CORBA::String_var objStr = GetORB()->object_to_string( anSubObject );
+ int subid = myStudyContext->findId( string( objStr.in() ) );
// for each mesh open the HDF group basing on its id
char submeshGrpName[ 30 ];
if ( ok ) {
//string myRefOnObject = myRefOnHyp->GetID();
CORBA::Object_var anObject = SObjectToObject( myRefOnHyp );
- int id = myStudyContext->findId( string( GetORB()->object_to_string( anObject ) ) );
+ CORBA::String_var objStr = GetORB()->object_to_string( anObject );
+ int id = myStudyContext->findId( string( objStr.in() ) );
//if ( myRefOnObject.length() > 0 ) {
//aSize[ 0 ] = myRefOnObject.length() + 1;
char hypName[ 30 ], hypId[ 30 ];
if ( ok ) {
//string myRefOnObject = myRefOnAlgo->GetID();
CORBA::Object_var anObject = SObjectToObject( myRefOnAlgo );
- int id = myStudyContext->findId( string( GetORB()->object_to_string( anObject ) ) );
+ CORBA::String_var objStr = GetORB()->object_to_string( anObject );
+ int id = myStudyContext->findId( string( objStr.in() ) );
//if ( myRefOnObject.length() > 0 ) {
//aSize[ 0 ] = myRefOnObject.length() + 1;
char algoName[ 30 ], algoId[ 30 ];
if ( !myGroupImpl )
continue;
- int anId = myStudyContext->findId( string( GetORB()->object_to_string( aSubObject ) ) );
+ CORBA::String_var objStr = GetORB()->object_to_string( aSubObject );
+ int anId = myStudyContext->findId( string( objStr.in() ) );
// For each group, create a dataset named "Group <group_persistent_id>"
// and store the group's user name into it
SMESH_Hypothesis_i* myImpl = dynamic_cast<SMESH_Hypothesis_i*>( GetServant( myHyp ).in() );
if ( myImpl ) {
myImpl->LoadFrom( hypdata.c_str() );
- string iorString = GetORB()->object_to_string( myHyp );
- int newId = myStudyContext->findId( iorString );
+ CORBA::String_var iorString = GetORB()->object_to_string( myHyp );
+ int newId = myStudyContext->findId( string( iorString.in() ) );
myStudyContext->mapOldToNew( id, newId );
}
else
SMESH_Hypothesis_i* myImpl = dynamic_cast<SMESH_Hypothesis_i*>( GetServant( myHyp ).in() );
if ( myImpl ) {
myImpl->LoadFrom( hypdata.c_str() );
- string iorString = GetORB()->object_to_string( myHyp );
- int newId = myStudyContext->findId( iorString );
+ CORBA::String_var iorString = GetORB()->object_to_string( myHyp );
+ int newId = myStudyContext->findId( string( iorString.in() ) );
myStudyContext->mapOldToNew( id, newId );
}
else
SMESH_Mesh_i* myNewMeshImpl = dynamic_cast<SMESH_Mesh_i*>( GetServant( myNewMesh ).in() );
if ( !myNewMeshImpl )
continue;
- string iorString = GetORB()->object_to_string( myNewMesh );
- int newId = myStudyContext->findId( iorString );
+ CORBA::String_var iorString = GetORB()->object_to_string( myNewMesh );
+ int newId = myStudyContext->findId( string( iorString.in() ) );
myStudyContext->mapOldToNew( id, newId );
::SMESH_Mesh& myLocMesh = myNewMeshImpl->GetImpl();
( myNewMeshImpl->createSubMesh( aSubShapeObject ) );
if ( aSubMesh->_is_nil() )
continue;
- string iorSubString = GetORB()->object_to_string( aSubMesh );
- int newSubId = myStudyContext->findId( iorSubString );
+ CORBA::String_var iorSubString = GetORB()->object_to_string( aSubMesh );
+ int newSubId = myStudyContext->findId( string( iorSubString.in() ) );
myStudyContext->mapOldToNew( subid, newSubId );
}
}
if ( aNewGroup->_is_nil() )
continue;
- string iorSubString = GetORB()->object_to_string( aNewGroup );
- int newSubId = myStudyContext->findId( iorSubString );
+ CORBA::String_var iorSubString = GetORB()->object_to_string( aNewGroup );
+ int newSubId = myStudyContext->findId( string( iorSubString.in() ) );
myStudyContext->mapOldToNew( subid, newSubId );
SMESH_GroupBase_i* aGroupImpl =
{
StudyContext* myStudyContext = GetCurrentStudyContext();
if ( myStudyContext && !CORBA::is_nil( theObject )) {
- string iorString = GetORB()->object_to_string( theObject );
- return myStudyContext->addObject( iorString );
+ CORBA::String_var iorString = GetORB()->object_to_string( theObject );
+ return myStudyContext->addObject( string( iorString.in() ) );
}
return 0;
}