]> SALOME platform Git repositories - modules/paravis.git/blobdiff - src/PVGUI/PVGUI_Tools.cxx
Salome HOME
add MEDReader tests
[modules/paravis.git] / src / PVGUI / PVGUI_Tools.cxx
index 54f27cfb24df2e4cd9c2ddb22f5ee27152aa26b0..f7764b6f5f08829d637e2c79b66644f7eedd5f66 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2010-2014  CEA/DEN, EDF R&D
+// Copyright (C) 2010-2015  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
 #include "SALOME_LifeCycleCORBA.hxx"
 #include "SalomeApp_Application.h"
 #include "SalomeApp_Study.h"
-#include <stdexcept>
 
 using namespace std;
 
 //=============================================================================
 namespace PARAVIS
 {
-  //------------------------------------------------------------
-  PARAVIS_Gen_i* GetParavisGen(const CAM_Module* theModule)
-  {
-    static PARAVIS_Gen_i* aGen = NULL;
-    if(!aGen){
-      SALOME_LifeCycleCORBA aLCC(SalomeApp_Application::namingService());
-      Engines::EngineComponent_var aComponent = aLCC.FindOrLoad_Component("FactoryServer","PARAVIS");
-      PARAVIS_Gen_var aPARAVIS = PARAVIS_Gen::_narrow(aComponent);
-      if(!CORBA::is_nil(aPARAVIS)){
-        aGen = PARAVIS_Gen_i::GetParavisGenImpl();
-      }
-    }
-    if(!aGen)
-      throw std::runtime_error("Can not create PARAVIS_Gen");
-    return aGen;
-  }
-
-  //------------------------------------------------------------
+  /**
+   *  Get current study.
+   */
   _PTR(Study) GetCStudy(const CAM_Module* theModule)
   {
     if (theModule && theModule->application()) {
       SalomeApp_Study* activeStudy = 
-       dynamic_cast<SalomeApp_Study*>(theModule->application()->activeStudy());
+          dynamic_cast<SalomeApp_Study*>(theModule->application()->activeStudy());
       if (activeStudy) {
-       return activeStudy->studyDS();
+          return activeStudy->studyDS();
       }
     }