Small modif due to modif of KERNEL Container modifications

This commit is contained in:
Anthony Geay 2021-02-22 16:22:23 +01:00
parent 064bf22985
commit 75250946ae
2 changed files with 4 additions and 9 deletions

View File

@ -195,7 +195,7 @@ bool GeometryGUI::IsInGeomComponent( _PTR(SObject) sobject )
//=======================================================================
SALOMEDS::Study_var GeometryGUI::getStudyServant()
{
SALOME_NamingService *aNamingService = SalomeApp_Application::namingService();
SALOME_NamingService_Abstract *aNamingService = SalomeApp_Application::namingService();
CORBA::Object_var aStudyObject = aNamingService->Resolve("/Study");
SALOMEDS::Study_var aStudy = SALOMEDS::Study::_narrow(aStudyObject);
return aStudy._retn();

View File

@ -34,17 +34,12 @@ std::string BuildGEOMInstance()
PortableServer::POAManager_var pman = poa->the_POAManager();
CORBA::PolicyList policies;
policies.length(0);
PortableServer::ObjectId_var conId;
//
{
char *argv[4] = {"Container","FactoryServer","GEOM",nullptr};
Engines_Container_i *cont = new Engines_Container_i(orb,poa,"FactoryServer",2,argv,false,false);
conId = poa->activate_object(cont);
}
Engines_Container_i *cont( KERNEL::getContainerSA() );
PortableServer::ObjectId * conId ( cont->getCORBAId() );
//
pman->activate();
//
GEOM_Gen_No_Session_i *servant = new GEOM_Gen_No_Session_i(orb,poa,const_cast<PortableServer::ObjectId*>(&conId.in()),"GEOM_inst_2","GEOM");
GEOM_Gen_No_Session_i *servant = new GEOM_Gen_No_Session_i(orb,poa,conId,"GEOM_inst_2","GEOM");
PortableServer::ObjectId *zeId = servant->getId();
CORBA::Object_var zeRef = poa->id_to_reference(*zeId);
char *interfaceName = servant->interfaceName();