]> SALOME platform Git repositories - modules/gui.git/commitdiff
Salome HOME
WIP
authorAnthony Geay <anthony.geay@edf.fr>
Thu, 18 Feb 2021 15:29:07 +0000 (16:29 +0100)
committerAnthony Geay <anthony.geay@edf.fr>
Thu, 18 Feb 2021 15:29:07 +0000 (16:29 +0100)
src/Session/SALOME_Session_Server.cxx
src/Session/Session_ServerLauncher.cxx
src/Session/Session_ServerThread.cxx

index b73e8f180475ff11a30e2825084606b8e45e0ac2..464f68e1f4f05e10a79ad2adf07b82183d8552af 100644 (file)
@@ -38,6 +38,7 @@
 #include "Session_ServerCheck.hxx"
 #include "Session_ServerLauncher.hxx"
 #include "Session_Promises.hxx"
+#include "SALOME_Fake_NamingService.hxx"
 
 #include "GUI_version.h"
 #include "Qtx.h"
@@ -458,6 +459,7 @@ SALOME::Session_var GUIAppNewStyle::getSession()
 // ---------------------------- MAIN -----------------------
 int AbstractGUIApp::main(int argc, char **argv)
 {
+  using NamingServiceImplementation = SALOME_Fake_NamingService;
   // Set-up application settings configuration (as for QSettings)
   // Note: these are default settings which can be customized (see below)
   QApplication::setOrganizationName("salome");
@@ -549,7 +551,7 @@ int AbstractGUIApp::main(int argc, char **argv)
 
   SUIT_Session *aGUISession = 0;
   GetInterfaceThread *guiThread = 0;
-  Session_ServerLauncher<SALOME_NamingService> *myServerLauncher = nullptr;
+  Session_ServerLauncher<NamingServiceImplementation> *myServerLauncher = nullptr;
 
 #if defined(WIN32) && defined(UNICODE)
   char **new_argv = NULL;
@@ -627,9 +629,9 @@ int AbstractGUIApp::main(int argc, char **argv)
     }
     // Free memory allocated for CommandLineToArgvW arguments.
     LocalFree(szArglist);
-    myServerLauncher = new Session_ServerLauncher<SALOME_NamingService>(nArgs, new_argv, orb, poa, &_GUIMutex, &_ServerLaunch, &_SessionMutex, &_SessionStarted);
+    myServerLauncher = new Session_ServerLauncher<NamingServiceImplementation>(nArgs, new_argv, orb, poa, &_GUIMutex, &_ServerLaunch, &_SessionMutex, &_SessionStarted);
 #else
-    myServerLauncher = new Session_ServerLauncher<SALOME_NamingService>(argc, argv, orb, poa, &_GUIMutex, &_ServerLaunch, &_SessionMutex, &_SessionStarted);
+    myServerLauncher = new Session_ServerLauncher<NamingServiceImplementation>(argc, argv, orb, poa, &_GUIMutex, &_ServerLaunch, &_SessionMutex, &_SessionStarted);
 #endif
     // ...block this thread until launcher is ready
     _ServerLaunch.wait(&_GUIMutex);
index f85a1b2c0736686cafe7b1cec73bf5cf636a7bdd..730e7f0897c3da7bb2af2e90de34f1b49b5cab7c 100644 (file)
@@ -261,3 +261,9 @@ void Session_ServerLauncher<MY_NS>::KillAll()
     delete (*itServ);
   }
 }
+
+template class Session_ServerLauncher<SALOME_NamingService>;
+
+#include "SALOME_Fake_NamingService.hxx"
+
+template class Session_ServerLauncher<SALOME_Fake_NamingService>;
index 8cc0a339f29f8688e605e59ba04585ff2b843230..5cc708528f11e0b0a638ac9a570155032db06432 100644 (file)
@@ -88,7 +88,7 @@ Session_ServerThread<MY_NS>::Session_ServerThread(int argc,
   _orb = CORBA::ORB::_duplicate(orb);
   _root_poa = PortableServer::POA::_duplicate(poa);
   _servType =-1;
-  _NS.reset( new SALOME_NamingService(_orb) ); // one instance per server to limit
+  _NS.reset( new MY_NS(_orb) ); // one instance per server to limit
                                                // multi thread coherence problems
   _container = nullptr;                        // embedded container
 }
@@ -452,3 +452,11 @@ void Session_SessionThread<MY_NS>::ActivateSession(int argc, char ** argv)
     INFOS("Caught unknown exception.");
   }
 }
+
+template class Session_ServerThread<SALOME_NamingService>;
+template class Session_SessionThread<SALOME_NamingService>;
+
+#include "SALOME_Fake_NamingService.hxx"
+
+template class Session_ServerThread<SALOME_Fake_NamingService>;
+template class Session_SessionThread<SALOME_Fake_NamingService>;