]> SALOME platform Git repositories - modules/med.git/commitdiff
Salome HOME
Remove dependency on GUI
authormnt <mnt@opencascade.com>
Tue, 19 Apr 2016 08:46:28 +0000 (11:46 +0300)
committermnt <mnt@opencascade.com>
Tue, 19 Apr 2016 08:46:28 +0000 (11:46 +0300)
src/MEDCalc/cmp/MED.cxx

index c89b152adc73982aa57281517068130c051506e2..8a69c612f4997c57bb33a9f3af5f6ea6e9b9fc76 100644 (file)
@@ -26,7 +26,8 @@
 
 #include <SALOMEDS_SObject.hxx>
 #include <Utils_ExceptHandlers.hxx>
-#include <SalomeApp_Application.h>
+#include <SALOME_LifeCycleCORBA.hxx>
+#include <SALOME_NamingService.hxx>
 
 #include <string>
 #include <sstream>
@@ -252,8 +253,8 @@ MED::hasObjectInfo()
 char*
 MED::getObjectInfo(CORBA::Long studyId, const char* entry)
 {
-  SALOME_NamingService* nameService = SalomeApp_Application::namingService();
-  CORBA::Object_var aSMObject = nameService->Resolve( "/myStudyManager" );
+  SALOME_LifeCycleCORBA lcc;
+  CORBA::Object_var aSMObject = lcc.namingService()->Resolve( "/myStudyManager" );
   SALOMEDS::StudyManager_var aStudyManager = SALOMEDS::StudyManager::_narrow( aSMObject );
   SALOMEDS::Study_var aStudy = aStudyManager->GetStudyByID( studyId );
   SALOMEDS::SObject_var aSObj = aStudy->FindObjectID( entry );