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