Salome HOME
allow using mpich for mpi2 coupling in Salome
[modules/kernel.git] / idl / SALOME_Component.idl
index e91c8b0463e4604c05257dee00d91819eeed31dd..a6e54530ebc2622102b10ce6a409e132d2fa90aa 100644 (file)
@@ -1,37 +1,36 @@
-//  Copyright (C) 2007-2010  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2011  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) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
+// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
 //
-//  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.
+// 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.
 //
-//  This library is distributed in the hope that it will be useful,
-//  but WITHOUT ANY WARRANTY; without even the implied warranty of
-//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-//  Lesser General Public License for more details.
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
 //
-//  You should have received a copy of the GNU Lesser General Public
-//  License along with this library; if not, write to the Free Software
-//  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
 //
-//  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
-
 //  File   : SALOME_Component.idl
 //  Author : Paul RASCLE, EDF
-//  $Header: 
-//
+
 #ifndef _SALOME_COMPONENT_IDL_
 #define _SALOME_COMPONENT_IDL_
 
+#include "SALOME_GenericObj.idl"
 #include "SALOMEDS.idl"
 #include "SALOME_Exception.idl"
 #include "SALOME_PyNode.idl"
 
-/*! \file SALOME_Component.idl \brief interfaces for Component and Container
+/*! \file SALOME_Component.idl \brief interfaces for EngineComponent and Container
 */
 
 /*! \brief
@@ -62,7 +61,7 @@ module Engines
 
   typedef sequence<KeyValuePair> FieldsDict;
 
-  interface Component ;
+  interface EngineComponent ;
   interface fileRef ;
   interface fileTransfer ;
   interface Salome_file;
@@ -95,8 +94,8 @@ module Engines
                             >0 otherwise (== study id)
       \return a loaded component
     */
-    Engines::Component create_component_instance(in string componentName,
-                                                 in long studyId);
+    Engines::EngineComponent create_component_instance(in string componentName,
+                                                       in long studyId);
 
     //! Create a new servant instance of a component with environment variables specified.
     /*!
@@ -110,9 +109,9 @@ module Engines
       \param reason      in case of error (return nil) a string explaining the error
       \return a loaded component
     */
-    Engines::Component create_component_instance_env(in string componentName,
-                                                     in long studyId, in FieldsDict env,
-                                                     out string reason);
+    Engines::EngineComponent create_component_instance_env(in string componentName,
+                                                           in long studyId, in FieldsDict env,
+                                                           out string reason);
     //! Find a servant instance of a component
     /*!
       \param registeredName  Name of the component in Registry or Name Service,
@@ -121,8 +120,8 @@ module Engines
                             >0 otherwise (== study id)
       \return the first instance found with same studyId
     */
-    Component find_component_instance(in string registeredName,
-                                     in long studyId);
+    EngineComponent find_component_instance(in string registeredName,
+                                            in long studyId);
 
     //! Find a servant instance of a component, or create a new one.
     /*!
@@ -134,14 +133,14 @@ module Engines
                             (not used any more, give empty string)
       \return a loaded component
     */
-    Component load_impl(in string nameToRegister,
-                       in string componentName);
+    EngineComponent load_impl(in string nameToRegister,
+                              in string componentName);
 
     //! Remove the component servant, and deletes all related objects
     /*!
       \param component_i     Component to be removed
     */
-    void remove_impl(in Component component_i);
+    void remove_impl(in EngineComponent component_i);
 
     //!  Unload component libraries from the container. 
     void finalize_removal() ;
@@ -217,13 +216,20 @@ module Engines
       \param code python code as text to load in the node
      */
     PyNode createPyNode(in string nodeName, in string code)  raises(SALOME::SALOME_Exception);
+
+    //! Create a PyScriptNode in the container
+    /*!
+      \param nodeName the name of the PyScriptNode
+      \param code python code as text to load in the node
+     */
+    PyScriptNode createPyScriptNode(in string nodeName, in string code)  raises(SALOME::SALOME_Exception);
   };
 
   /*! \brief Interface of the %component.
   This interface is used for interaction between the %container and the
   %component and between the components inside the container.
   */
-  interface Component
+  interface EngineComponent
   {
     //!  The name of the instance of the %Component
     readonly attribute string instanceName ;
@@ -317,8 +323,9 @@ module Engines
       the data model of component
     */    
     TMPFile DumpPython(in Object theStudy,
-                      in boolean isPublished, 
-                      out boolean isValidScript);
+                       in boolean isPublished,
+                       in boolean isMultiFile,
+                       out boolean isValidScript);
 
     
     //! Returns a CORBA Ref of a input Salome_file managed by a service.
@@ -333,7 +340,7 @@ module Engines
       sends the file's reference.
     */
     Engines::Salome_file getInputFileToService(in string service_name, 
-                                              in string Salome_file_name)       raises(SALOME::SALOME_Exception);
+                                               in string Salome_file_name) raises(SALOME::SALOME_Exception);
 
     //! Check service input files (transfer them if needed) 
     /*!
@@ -351,7 +358,7 @@ module Engines
 
       \exception contains informations about files that are not in a good state.
     */
-    void checkInputFilesToService(in string service_name)                              raises(SALOME::SALOME_Exception);
+    void checkInputFilesToService(in string service_name)           raises(SALOME::SALOME_Exception);
 
     //!  This method adds a input Salome_file to a service of the component.
     /*!
@@ -365,7 +372,7 @@ module Engines
       a Salome_file with this name for the service.
     */
     Engines::Salome_file setInputFileToService(in string service_name,
-                                              in string Salome_file_name)      raises(SALOME::SALOME_Exception);
+                                               in string Salome_file_name)   raises(SALOME::SALOME_Exception);
 
     //!  Returns a CORBA Ref of a output Salome_file managed by a service.
     /*!
@@ -379,7 +386,7 @@ module Engines
       sends the file's reference.
     */
     Engines::Salome_file getOutputFileToService(in string service_name, 
-                                               in string Salome_file_name) raises(SALOME::SALOME_Exception);
+                                                in string Salome_file_name) raises(SALOME::SALOME_Exception);
 
     //! Check service output files (transfer them if needed) 
     /*!
@@ -397,7 +404,7 @@ module Engines
 
       \exception contains informations about files that are not in a good state.
     */
-    void checkOutputFilesToService(in string service_name)                      raises(SALOME::SALOME_Exception);
+    void checkOutputFilesToService(in string service_name)        raises(SALOME::SALOME_Exception);
 
     //!  This method adds an output Salome_file to a service of the component.
     /*!
@@ -411,7 +418,7 @@ module Engines
       a Salome_file with this name for the service.
     */
     Engines::Salome_file setOutputFileToService(in string service_name,
-                                               in string Salome_file_name)      raises(SALOME::SALOME_Exception);
+                                                in string Salome_file_name)  raises(SALOME::SALOME_Exception);
 
     //! Indicate if the component instance provides custom information about its objects.
     /*!
@@ -436,6 +443,16 @@ module Engines
     string getObjectInfo(in long studyId, in string entry);
   } ;
 
+  /*!
+    \brief Base interface of the %component that supports exporting data.
+  */
+  interface ImportableComponent
+  {
+    /*! \brief Get a list of supported formats */
+    SALOME::StringSeq GetImportableFormats();
+    boolean           ImportDataAs(in string format, in SALOME::GenericObj exporter);
+  };
+
   //!  A block of binary data used for file transfer. The maximum size of the block is defined on server side.
   typedef sequence<octet> fileBlock;
 
@@ -443,7 +460,7 @@ module Engines
      The fileTransfer and fileRef interfaces provide a file transfer service
      between different computers.
   */
-  interface fileTransfer
+  interface fileTransfer : SALOME::GenericObj
   {
     //! Open the file transfer
     /*!
@@ -530,7 +547,7 @@ module Engines
 
       \exception contains informations of errors if the loading doesn't succeed.
      */
-    void load(in string hdf5_file)                         raises (SALOME::SALOME_Exception);
+    void load(in string hdf5_file)                            raises (SALOME::SALOME_Exception);
 
     //!  Save a Salome_file into a hdf5_file.
     /*!
@@ -540,7 +557,7 @@ module Engines
       \exception contains informations of errors if the save doesn't succeed.
 
     */
-    void save(in string hdf5_file)                         raises (SALOME::SALOME_Exception);
+    void save(in string hdf5_file)                            raises (SALOME::SALOME_Exception);
 
     //!  Save a Salome_file into a hdf5_file. 
     /*!
@@ -551,7 +568,7 @@ module Engines
       \exception contains informations of errors if the save doesn't succeed.
 
     */
-    void save_all(in string hdf5_file)                     raises (SALOME::SALOME_Exception);
+    void save_all(in string hdf5_file)                            raises (SALOME::SALOME_Exception);
 
 /**************/
 
@@ -592,7 +609,7 @@ module Engines
       \exception raised if the file doesn't exist.
     */
     void connectDistributedFile(in string file_name,
-                               in Engines::Salome_file source_Salome_file) raises (SALOME::SALOME_Exception);
+                                in Engines::Salome_file source_Salome_file) raises (SALOME::SALOME_Exception);
     
     //!  Connect the file_name with a Distributed file_name.
     /*!
@@ -603,7 +620,7 @@ module Engines
       \exception raised if the file doesn't exist.
     */
     void setDistributedSourceFile(in string file_name,
-                                 in string source_file_name) raises (SALOME::SALOME_Exception);
+                                  in string source_file_name) raises (SALOME::SALOME_Exception);
 
 /**************/
 
@@ -612,7 +629,7 @@ module Engines
 
       \exception raised if some of the files are not ok.
     */
-    void recvFiles()                                       raises (SALOME::SALOME_Exception) ;
+    void recvFiles()                                            raises (SALOME::SALOME_Exception) ;
 
 /**************/
 
@@ -623,7 +640,7 @@ module Engines
 
       \exception raised if the file doesn't exist.
     */
-    void removeFile(in string file_name)                   raises (SALOME::SALOME_Exception);
+    void removeFile(in string file_name)                    raises (SALOME::SALOME_Exception);
 
     //!  Remove all the files of the Salome_file.
     void removeFiles();
@@ -645,7 +662,7 @@ module Engines
 
       \exception raised if the file doesn't exist.
     */
-    Engines::file  getFileInfos(in string file_name)       raises (SALOME::SALOME_Exception);
+    Engines::file  getFileInfos(in string file_name) raises (SALOME::SALOME_Exception);
 
     //!  Return the state of the Salome_file.
     Engines::SfState getSalome_fileState();
@@ -686,7 +703,7 @@ module Engines
     Container getContainer();
 
     boolean addRef(in string machine,
-               in string fileName);
+                   in string fileName);
 
     string getRef(in string machine);
   };