]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
First SMESH/GEOM case OK without external Server connection
authorAnthony Geay <anthony.geay@edf.fr>
Sat, 16 Jan 2021 04:59:24 +0000 (05:59 +0100)
committerAnthony Geay <anthony.geay@edf.fr>
Sat, 16 Jan 2021 04:59:24 +0000 (05:59 +0100)
src/ModuleCatalog/CMakeLists.txt
src/ModuleCatalog/SALOME_ModuleCatalog_impl.cxx
src/ModuleCatalog/SALOME_ModuleCatalog_impl.hxx

index 3c8a47a224df2dbbe56a4f34f3dfb196196ccb80..fd758395255b87a23e9a3601902dd3e4d1e8f7c0 100644 (file)
@@ -26,6 +26,8 @@ INCLUDE_DIRECTORIES(
   ${CMAKE_CURRENT_SOURCE_DIR}/../SALOMELocalTrace
   ${CMAKE_CURRENT_SOURCE_DIR}/../NamingService
   ${CMAKE_CURRENT_SOURCE_DIR}/../Utils
+  ${CMAKE_CURRENT_SOURCE_DIR}/../KernelHelpers
+  ${CMAKE_CURRENT_SOURCE_DIR}/../LifeCycleCORBA
   ${PROJECT_BINARY_DIR}/idl
 )
 
@@ -36,6 +38,7 @@ SET(COMMON_LIBS
   SALOMELocalTrace
   SALOMEBasics
   SalomeIDLKernel
+  SalomeKernelHelpers
   ${LIBXML2_LIBRARIES}
   ${PTHREAD_LIBRARIES}
 )
index 326dddc149563c369915f88389202849dc3c66b5..b5de2b0d9b28697b0acbe9e7bce019f8b752d964 100644 (file)
@@ -60,6 +60,18 @@ static int MYDEBUG = 0;
 static const char* SEPARATOR     = "::";
 static const char* OLD_SEPARATOR = ":";
 
+SALOME_ModuleCatalog::ModuleCatalog_ptr KERNEL::getModuleComponentServantSA()
+{
+  static SALOME_ModuleCatalog::ModuleCatalog_var moduleCata;
+  if(CORBA::is_nil(moduleCata))
+  {
+    CORBA::ORB_ptr orb = KERNEL::getORB();
+    char *argv[4] = {"SALOME_ModuleCatalog_Server","-common","\"/home/H87074/salomeDEV/DEV2/share/salome/resources/geom/GEOMCatalog.xml\"::\"/home/H87074/salomeDEV/DEV2/share/salome/resources/smesh/SMESHCatalog.xml\"",nullptr};
+    SALOME_ModuleCatalogImpl *servant = new SALOME_ModuleCatalogImpl(3,argv,orb);
+    moduleCata = servant->_this();
+  }
+  return SALOME_ModuleCatalog::ModuleCatalog::_duplicate(moduleCata);
+}
 
 std::list<std::string> splitStringToList(const std::string& theString, const std::string& theSeparator)
 {
index 3936d778724d2a273d821b75cd0c27cfaf71c711..c593914ca8333668aa0afddcde207d5a6627f25d 100644 (file)
 //  Module : SALOME
 //  $Header$
 //
-#ifndef MODULECATALOG_IMPL_H
-#define MODULECATALOG_IMPL_H
+#pragma once
 
 #include "SALOME_ModuleCatalog.hxx"
+#include "SALOME_KernelServices.hxx"
 
 #include <string>
 #include <map>
 #pragma warning(disable:4290) // Warning Exception ...
 #endif
 
+namespace KERNEL
+{
+  MODULECATALOG_EXPORT SALOME_ModuleCatalog::ModuleCatalog_ptr getModuleComponentServantSA();
+}
+
 class MODULECATALOG_EXPORT SALOME_ModuleCatalogImpl: public POA_SALOME_ModuleCatalog::ModuleCatalog
 {
   class Private;
@@ -140,5 +145,3 @@ private:
   CORBA::ORB_ptr _orb;
   Private* myPrivate;
 };
-
-#endif // MODULECATALOG_IMPL_H