Salome HOME
Include SalomeMacros.cmake with NO_POLICY_SCOPE to apply policies
[modules/med.git] / idl / MED_Gen.idl
index 6fa30969524081e00947fd245968bd7f1f7e2630..8ce005caa6dc4d7a7cc9dfd4d0c81be9ae8a11c9 100644 (file)
@@ -1,12 +1,9 @@
-// Copyright (C) 2007-2013  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
+// Copyright (C) 2005-2020  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
 // License as published by the Free Software Foundation; either
-// version 2.1 of the License.
+// version 2.1 of the License, or (at your option) any later version.
 //
 // This library is distributed in the hope that it will be useful,
 // but WITHOUT ANY WARRANTY; without even the implied warranty of
 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
 
-//=============================================================================
-// File      : Med_Gen.idl
-// Project   : SALOME
-//=============================================================================
-
-#ifndef _Med_GEN_IDL_
-#define _Med_GEN_IDL_
+#ifndef __MED_GEN_IDL_
+#define __MED_GEN_IDL_
 
-
-#include "SALOME_Exception.idl"
 #include "SALOME_Component.idl"
-#include "SALOMEDS.idl"
-#include "MED.idl"
+#include "SALOME_Exception.idl"
+#include "MEDDataManager.idl"
 
-module SALOME_MED
+module MED_ORB
 {
-  interface MED_Gen_Driver : SALOMEDS::Driver
-  {
+  /*!
+    \brief Operation result codes
+  */
+  enum status {
+    OP_OK,                   //!< OK result
+    OP_ERROR                 //!< ERROR: other problems
   };
 
-  interface MED_Gen : Engines::EngineComponent, MED_Gen_Driver
+  typedef sequence<long> PresentationsList;
+
+  interface
+  MED_Gen : Engines::EngineComponent
   {
-    /*!
-      it returns a Corba pointer %MESH on the mesh stored in the .med file
-      <VAR>fileName</VAR> with the name <VAR>meshName</VAR>.
-     */
-    SALOME_MED::GMESH readMeshInFile(in string fileName, in string studyName,
-                                    in string meshName)
-      raises(SALOME::SALOME_Exception);
+    status addDatasourceToStudy(in MEDCALC::DatasourceHandler datasourceHandler)
+      raises (SALOME::SALOME_Exception);
+
+    status registerPresentationField(in long fieldId,
+                                     in string name,
+                                     in string type,
+                                     in string ico,
+                                     in long presentationId)
+      raises (SALOME::SALOME_Exception);
 
-    /*!
-      it returns a Corba pointer %FIELD on the field instance with the order
-      <VAR>ordre</VAR> at the iteration <VAR>iter</VAR>, stored in the .med
-      file <VAR>fileName</VAR> with the name <VAR>fieldName</VAR>.
-     */
-    SALOME_MED::FIELD readFieldInFile(in string fileName, in string studyName,
-                                     in string fieldName, in long iter,
-                                     in long ordre)
+    status registerPresentationMesh(in long meshId,
+                                    in string name,
+                                    in string type,
+                                    in string ico,
+                                    in long presentationId)
+          raises (SALOME::SALOME_Exception);
+
+    status unregisterPresentation(in long presentationId)
       raises (SALOME::SALOME_Exception);
 
-    /*!
-      it returns a Corba pointer on the %MED object regrouping all objects
-      (%MESH and %FIELD) stored in the file <VAR>fileName</VAR>. All instances
-      of the fields are stored without their type.
-    */
-    SALOME_MED::MED readStructFile(in string fileName,
-                                  in string studyName)
+//    PresentationsList getSiblingPresentations(in long presentationId)
+//      raises (SALOME::SALOME_Exception);
+
+    // Get all presentations in study:
+    PresentationsList getStudyPresentations()
       raises (SALOME::SALOME_Exception);
 
-    /*!
-      It pushes all Corba pointers (%MED, %MESH, %FIELD) in the study named
-      <VAR>studyName</VAR>. The %MED object regroups all objects
-      (%MESH and %FIELD) stored in the file <VAR>fileName</VAR> and all
-      instances of the fields are stored with their own type.
-    */
-    void readStructFileWithFieldType(in string fileName,
-                                    in string studyName)
+    string getStudyPresentationEntry(in long presentationId)
       raises (SALOME::SALOME_Exception);
+
+    void cleanUp();
   };
 };