]> SALOME platform Git repositories - modules/geom.git/blobdiff - src/GEOM_I/GEOM_Gen_Session_i.cc
Salome HOME
[bos #40619][CEA] Add Fuzzy parameter to partition and boolean operators
[modules/geom.git] / src / GEOM_I / GEOM_Gen_Session_i.cc
index 6c8528309320065a16d9958cfc9c9d083f32debd..c0cd1ed4819e3af88c9a7b5643325c740ebcdf5f 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2021  CEA/DEN, EDF R&D
+// Copyright (C) 2021-2024  CEA, EDF
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -50,6 +50,8 @@ SALOMEDS::Study_var GEOM_Gen_Session_i::getStudyServant()
   return aStudy;
 }
 
+#include "GEOM_Gen_No_Session_i.hh"
+
 extern "C"
 {
   GEOM_I_EXPORT  PortableServer::ObjectId* GEOMEngine_factory(CORBA::ORB_ptr orb,
@@ -58,7 +60,17 @@ extern "C"
                                                const char*                   instanceName,
                                                const char*                   interfaceName)
   {
-    GEOM_Gen_Session_i* myGEOM_Gen_i = new GEOM_Gen_Session_i(orb, poa, contId, instanceName, interfaceName);
-    return myGEOM_Gen_i->getId();
+    CORBA::Object_var o = poa->id_to_reference(*contId);
+    Engines::Container_var cont = Engines::Container::_narrow(o);
+    if(cont->is_SSL_mode())
+    {
+      GEOM_Gen_No_Session_i* myGEOM_Gen_i = new GEOM_Gen_No_Session_i(orb, poa, contId, instanceName, interfaceName);
+      return myGEOM_Gen_i->getId();
+    }
+    else
+    {
+      GEOM_Gen_Session_i* myGEOM_Gen_i = new GEOM_Gen_Session_i(orb, poa, contId, instanceName, interfaceName);
+      return myGEOM_Gen_i->getId();
+    }
   }
 }