Salome HOME
tag 5.1.2 --> 5.1.3
[modules/kernel.git] / idl / SALOME_Component.idl
index e47f886d031cac89eb998532d292922aff6a2fc6..fc555dc34cc955bd708204bb10c517f490abd27b 100644 (file)
@@ -28,6 +28,7 @@
 
 #include "SALOMEDS.idl"
 #include "SALOME_Exception.idl"
+#include "SALOME_PyNode.idl"
 
 /*! \file SALOME_Component.idl \brief interfaces for Component and Container
 */
@@ -52,6 +53,12 @@ module Engines
     any value;
   };
 
+  //!  Structure data type to hold reference on data 
+  struct dataref
+  {
+    string ref;
+  };
+
   typedef sequence<KeyValuePair> FieldsDict;
 
   interface Component ;
@@ -179,6 +186,20 @@ module Engines
     */
     fileTransfer getFileTransfer();
 
+    //! Copy a file from a remote host (container) to a local file
+    /*!
+      \param contai the remote container
+      \param remoteFile the file on the remote host to copy
+      \param localFile the local file to create by copy
+     */
+    void copyFile(in Container contai, in string remoteFile, in string localFile);
+
+    //! Create a PyNode in the container
+    /*!
+      \param nodeName the name of the PyNode
+      \param code python code as text to load in the node
+     */
+    PyNode createPyNode(in string nodeName, in string code)  raises(SALOME::SALOME_Exception);
   };
 
   /*! \brief Interface of the %component.
@@ -196,15 +217,6 @@ module Engines
     //!  Determines whether the server has already been loaded or not.
     void ping();
 
-//    
-//       Set study associated to component instance
-//       \param studyId
-//       (=0:  multistudy component instance,
-//        >0: study id associated to this instance
-//       \return false if already set with a different value (change not possible)
-//     
-//     boolean setStudyId(in long studyId);
-
     //!  Get study associated to component instance
     /*!
       get study associated to component instance
@@ -407,10 +419,6 @@ module Engines
     string getObjectInfo(in long studyId, in string entry);
   } ;
 
-  interface Parallel_Component : Engines::Component {
-    void send_parallel_proxy_object(in Object proxy_ref);
-  };
-
   //!  A block of binary data used for file transfer. The maximum size of the block is defined on server side.
   typedef sequence<octet> fileBlock;
 
@@ -430,6 +438,12 @@ module Engines
       File.
     */
     long open(in string fileName);
+    //! Open the file transfer in write mode for file fileName
+    /*!
+      \param fileName the file to copy into with putBlock
+      \return the id to use with putBlock
+    */
+    long openW(in string fileName);
 
     //! Close the file transfer
     /*!
@@ -444,6 +458,14 @@ module Engines
       The last block is empty, and identifies the end of file.
     */
     fileBlock getBlock(in long fileId);
+
+    //! Put a file data block
+    /*!
+       \param fileId identification of the file obtained by openW
+       \param block a data block to copy into the file identified by fileId
+    */
+    void putBlock(in long fileId, in fileBlock block);
+
   };
 
   //!  A file managed by a Salome_file. 
@@ -651,50 +673,6 @@ module Engines
 
     string getRef(in string machine);
   };
-
-  /*! \brief Interface of a Parallel_Salome_file
-    This interface is used by parallel components and containers.
-    It adds methods to enable to choose on which node of the parallel component the file has to 
-    be received.
-  */
-  interface Parallel_Salome_file : Engines::Salome_file {
-
-    /*!
-      Set a number of node for the file. Default is the node 0.
-
-      \param file_name name of the file.
-      \param node_nbr node number where the file is.
-
-      \exception raised if the file doesn't exist.
-    */
-    void setFileNode(in string file_name, in long node_nbr) raises (SALOME::SALOME_Exception);
-
-    /*!
-      Get the number of the node that actually managed the file.
-
-      \param file_name name of managed file.
-
-      \return node number of the file
-
-      \exception raised if the file doesn't exist.
-     */
-    long getFileNode(in string file_name) raises (SALOME::SALOME_Exception);
-
-    /*!
-      This method update the state of file for the Parallel_Salome_file. 
-
-      \param new_file the new state of file.
-     */
-    Engines::Container updateFile(in Engines::file new_file);
-
-    /*!
-      This method is used by the parallel implementation of recvFiles.
-
-      \exception raised if the file cannot be ok.
-     */
-    void recvFiles_node() raises (SALOME::SALOME_Exception);
-
-  };
 };
 
 #endif