Salome HOME
bos #26457 Factorization of ORB initialization
[modules/kernel.git] / src / MPIContainer / SALOME_MPIContainer.cxx
index a2bec25ee5e5b4b369a170e031f3f4fe02653c01..af58240ee605706db54f4288f3838c2596183f6a 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2019  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2021  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -22,9 +22,9 @@
 
 #include <mpi.h>
 #include <iostream>
+#include "ArgvKeeper.hxx"
 #include "MPIContainer_i.hxx"
-#include "Utils_ORB_INIT.hxx"
-#include "Utils_SINGLETON.hxx"
+#include "OpUtil.hxx"
 #include "utilities.h"
 
 int main(int argc, char* argv[])
@@ -36,8 +36,8 @@ int main(int argc, char* argv[])
   MPI_Comm_rank(MPI_COMM_WORLD,&numproc);
 
   // Initialise the ORB.
-  ORB_INIT &init = *SINGLETON_<ORB_INIT>::Instance() ;
-  CORBA::ORB_var &orb = init( argc , argv ) ;
+  SetArgcArgv(argc, argv);
+  CORBA::ORB_ptr orb = KERNEL::GetRefToORB();
   //  SALOMETraceCollector *myThreadTrace = SALOMETraceCollector::instance(orb);
  
   BEGIN_OF("[" << numproc << "] " << argv[0])