Salome HOME
svn merge -r31:HEAD svn://nepal.der.edf.fr/OPENTURNS/GENERICSOLVER_SRC/branches/YACS_...
[samples/genericsolver.git] / idl / GENERICSOLVER_Gen.idl
index 13c324ff2d81acf1719327b8c3336a472d328b32..1e9f67d0b68ae51e9c8cd56ebc6227ce681a01d7 100644 (file)
@@ -16,6 +16,9 @@
 //
 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+//  $Id$
+//
+
 #ifndef __GENERICSOLVER_GEN__
 #define __GENERICSOLVER_GEN__
 
@@ -28,6 +31,8 @@ module GENERICSOLVER_ORB
 
   typedef sequence<double> Point;
   typedef SALOMEDS::ID ID;
+  typedef sequence<string> VarList;
+  typedef Engines::fileBlock pyobj;
 
   interface GENERICSOLVER_Gen : Engines::Component, SALOMEDS::Driver
   {
@@ -46,7 +51,7 @@ module GENERICSOLVER_ORB
      * @param entry              the identifier of the study case within the study
      * @param wrapperDescription a string containing the XML wrapper description
      */
-    short Init(in short studyID, in ID entry, in string wrapperDescription)
+    long Init(in long studyID, in ID entry, in string wrapperDescription)
       raises (SALOME::SALOME_Exception);
 
     /**
@@ -59,7 +64,7 @@ module GENERICSOLVER_ORB
      * @param inPoint   a vector of floating point values to be modified
      * @param outPoint  the result of the computation as a vector of floating point values
      */
-    short Exec(in Point inPoint, inout Point outPoint)
+    long Exec(in Point inPoint, out Point outPoint)
       raises (SALOME::SALOME_Exception);
 
     /**
@@ -70,7 +75,43 @@ module GENERICSOLVER_ORB
      *
      * @return          0 if success, non zero if failure
      */
-    short Finalize()
+    long Finalize()
+      raises (SALOME::SALOME_Exception);
+
+
+    /**
+     * @brief Initialize the component with the deterministic variables and the lists of
+     *        probabilistic variables.
+     *
+     * The InitWithVarList method prepares the component for a series of computation
+     * with the method ExecWithVarList. It stores the deterministic variables and the
+     * lists of input and output variables to identify them in future calls to
+     * ExecWithVarList.
+     *
+     * @param inputVarList      a list of strings containing the names of the input
+     *                          variables in the same order as in subsequent calls to
+     *                          ExecWithVarList.
+     * @param outputVarList     a list of strings containing the names of the output
+     *                          variables in the same order as they should be returned
+     *                          in subsequent calls to ExecWithVarList.
+     * @param deterministicVars a python dictionary containing the deterministic
+     *                          variables (mapping variable names to variable values)
+     */
+    void InitWithVarList(in VarList inputVarList, in VarList outputVarList, in pyobj deterministicVars)
+      raises (SALOME::SALOME_Exception);
+
+    /**
+     * @brief Execute a computation with a given sample of variables.
+     *
+     * The ExecWithVarList method realizes the computation with some parameters (within
+     * inPoint) corresponding to the variables set previously with the method
+     * InitWithVarList. The result is put in outPoint in the order specified by
+     * outputVarList of InitWithVarList method.
+     *
+     * @param inPoint   a vector of floating point values to be evaluated
+     * @param outPoint  the result of the computation as a vector of floating point values
+     */
+    void ExecWithVarList(in Point inPoint, out Point outPoint)
       raises (SALOME::SALOME_Exception);
 
   };