return my_result;
}
*/
+
+static Engines_Container_i *_container_singleton_ssl = nullptr;
+
+Engines_Container_i *KERNEL::getContainerIdSA()
+{
+
+ if(!_container_singleton_ssl)
+ {
+ int argc(0); orb = CORBA::ORB_init(argc,nullptr); }
+ CORBA::Object_var obj = orb->resolve_initial_references("RootPOA");
+ PortableServer::POA_var poa = PortableServer::POA::_narrow(obj);
+ PortableServer::POAManager_var pman = poa->the_POAManager();
+ CORBA::PolicyList policies;
+ policies.length(0);
+ PortableServer::ObjectId_var conId;
+ //
+ {
+ char *argv[4] = {"Container","FactoryServer","toto",nullptr};
+ _container_singleton_ssl = new Engines_Container_i(orb,poa,"FactoryServer",2,argv,false,false);
+ conId = poa->activate_object(_container_singleton_ssl);
+ }
+ }
+CORBA::ORB_var orb;
+ { int argc(0); orb = CORBA::ORB_init(argc,nullptr); }
+ CORBA::Object_var obj = orb->resolve_initial_references("RootPOA");
+ PortableServer::POA_var poa = PortableServer::POA::_narrow(obj);
+ PortableServer::POAManager_var pman = poa->the_POAManager();
+ CORBA::PolicyList policies;
+ policies.length(0);
+ PortableServer::ObjectId_var conId;
+ //
+ {
+ char *argv[4] = {"Container","FactoryServer","toto",nullptr};
+ Engines_Container_i *cont = new Engines_Container_i(orb,poa,"FactoryServer",2,argv,false,false);
+ conId = poa->activate_object(cont);
+ }
+ //
+ 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");
+ PortableServer::ObjectId *zeId = servant->getId();
+ CORBA::Object_var zeRef = poa->id_to_reference(*zeId);
+ char *interfaceName = servant->interfaceName();
+ std::string interfaceNameCpp(interfaceName);
+ CORBA::string_free(interfaceName);
+ KERNEL::RegisterCompo(interfaceNameCpp,zeRef);
+ CORBA::String_var ior = orb->object_to_string(zeRef);
+ return std::string(ior.in());
+}
+
+PortableServer::ObjectId_var KERNEL::getContainerIdSA()
+{
+
+}
+
+Engines::Container_var KERNEL::getContainerRefSA()
+{
+
+}
#include "SALOME_Fake_NamingService.hxx"
-SALOME_Fake_NamingService::SALOME_Fake_NamingService(CORBA::ORB_ptr orb)
+SALOME_Fake_NamingService::SALOME_Fake_NamingService(CORBA::ORB_ptr orb):_orb(CORBA::ORB::_duplicate(orb))
{
}
void SALOME_Fake_NamingService::Register(CORBA::Object_ptr ObjRef, const char* Path)
{
+ std::lock_guard<std::mutex> g(_mutex);
+ CORBA::Object_var ObjRefAuto = CORBA::Object::_duplicate(ObjRef);
+ _map[Path] = ObjRefAuto;
}
CORBA::Object_ptr SALOME_Fake_NamingService::Resolve(const char* Path)
{
+ std::string pathCpp(Path);
+ if(pathCpp == )
}