]> SALOME platform Git repositories - modules/homard.git/blobdiff - src/HOMARDGUI/HOMARDGUI.cxx
Salome HOME
Copyright update 2022
[modules/homard.git] / src / HOMARDGUI / HOMARDGUI.cxx
index 0ef4406d1f1f2f000f40aaf0cb37b769eb085d10..956a527022f01a1b830d49a7ba0c40bca75e5408 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2011-2020  CEA/DEN, EDF R&D
+// Copyright (C) 2011-2022  CEA/DEN, EDF R&D
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -24,8 +24,7 @@
 #include "HOMARDGUI.h"
 
 // SALOME Includes
-#include "Utils_ORB_INIT.hxx"
-#include "Utils_SINGLETON.hxx"
+#include "OpUtil.hxx"
 #include "SALOME_LifeCycleCORBA.hxx"
 
 #include "SUIT_ResourceMgr.h"
@@ -49,6 +48,8 @@
 #include "SalomeApp_Module.h"
 #include "SALOMEconfig.h"
 #include <SALOME_LifeCycleCORBA.hxx>
+#include <SALOME_NamingService_Abstract.hxx>
+#include <SALOME_KernelServices.hxx>
 
 #include <utilities.h>
 
@@ -105,7 +106,8 @@ HOMARDGUI::~HOMARDGUI()
 //=======================================================================
 HOMARD::HOMARD_Gen_var HOMARDGUI::InitHOMARDGen(SalomeApp_Application* app)
 {
-  Engines::EngineComponent_var comp = app->lcc()->FindOrLoad_Component( "FactoryServer","HOMARD" );
+  Engines::EngineComponent_var comp;
+  comp = app->lcc()->FindOrLoad_Component( "FactoryServer","HOMARD" );
   HOMARD::HOMARD_Gen_var clr = HOMARD::HOMARD_Gen::_narrow(comp);
   ASSERT(!CORBA::is_nil(clr));
   return clr;
@@ -721,9 +723,7 @@ void HOMARDGUI::setOrb()
 {
   try
   {
-     ORB_INIT &init = *SINGLETON_<ORB_INIT>::Instance();
-     ASSERT(SINGLETON_<ORB_INIT>::IsAlreadyExisting());
-     _orb = init( 0 , 0 );
+     _orb = KERNEL::GetRefToORB();
   }
   catch (...)
   {