Salome HOME
13c324ff2d81acf1719327b8c3336a472d328b32
[samples/genericsolver.git] / idl / GENERICSOLVER_Gen.idl
1 //  Copyright (C) 2009-2010 EDF R&D
2 //
3 //  This library is free software; you can redistribute it and/or
4 //  modify it under the terms of the GNU Lesser General Public
5 //  License as published by the Free Software Foundation; either
6 //  version 2.1 of the License.
7 //
8 //  This library is distributed in the hope that it will be useful,
9 //  but WITHOUT ANY WARRANTY; without even the implied warranty of
10 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 //  Lesser General Public License for more details.
12 //
13 //  You should have received a copy of the GNU Lesser General Public
14 //  License along with this library; if not, write to the Free Software
15 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 //
17 //  See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19 #ifndef __GENERICSOLVER_GEN__
20 #define __GENERICSOLVER_GEN__
21
22 #include "SALOME_Component.idl"
23 #include "SALOMEDS.idl"
24 #include "SALOME_Exception.idl"
25
26 module GENERICSOLVER_ORB
27 {
28
29   typedef sequence<double> Point;
30   typedef SALOMEDS::ID ID;
31
32   interface GENERICSOLVER_Gen : Engines::Component, SALOMEDS::Driver
33   {
34
35     /**
36      * @brief Prepare module for later computation.
37      *
38      * The Init method prepares the module for a series of computation
39      * based on a study case. The study case is a set of parameters that
40      * globally defines _ALL_ information needed to make a computation.
41      * When Init exits, the module is ready to run if a call to an hypothetical
42      * method Exec() (without any more argument) occurs.
43      *
44      * @return                   0 if success, non zero if failure
45      * @param studyID            the identifier of the study containing the study case
46      * @param entry              the identifier of the study case within the study
47      * @param wrapperDescription a string containing the XML wrapper description
48      */
49     short Init(in short studyID, in ID entry, in string wrapperDescription)
50       raises (SALOME::SALOME_Exception);
51
52     /**
53      * @brief Run the module with modified parameters
54      *
55      * The Run method realizes the computation with some parameters (within inPoint)
56      * altered compared to what Init set before. The result is put in outPoint.
57      *
58      * @return          0 if success, non zero if failure
59      * @param inPoint   a vector of floating point values to be modified
60      * @param outPoint  the result of the computation as a vector of floating point values
61      */
62     short Exec(in Point inPoint, inout Point outPoint)
63       raises (SALOME::SALOME_Exception);
64
65     /**
66      * @brief Cleanup everything that was previously set
67      *
68      * The Finalize method is in charge of cleaning everything that what set hitherto.
69      * It may be empty.
70      *
71      * @return          0 if success, non zero if failure
72      */
73     short Finalize()
74       raises (SALOME::SALOME_Exception);
75
76   };
77 };
78
79 #endif