Salome HOME
updated copyright message
[samples/calculator.git] / idl / CALCULATOR_Gen.idl
index 30fd926325bb550a21ee8261aa21bbfb75c871aa..79e7d42ff164babfd6df2dd6677848d05bd44a8b 100644 (file)
@@ -1,11 +1,14 @@
-// Copyright (C) 2005  CEA/DEN, EDF R&D
+// Copyright (C) 2007-2023  CEA, EDF, OPEN CASCADE
+//
+// 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.
+// version 2.1 of the License, or (at your option) any later version.
 //
-// This library is distributed in the hope that it will be useful
+// 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.
 // 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/
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
 //
+
 #ifndef __CALCULATOR_GEN__
 #define __CALCULATOR_GEN__
+
 /*!
- \defgroup EXAMPLES SALOME EXAMPLES components
- */
 \defgroup EXAMPLES SALOME EXAMPLES components
+*/
 
 #include "SALOME_Component.idl"
 #include "SALOME_Exception.idl"
-#include "MED.idl"
-
-
-/*!  \ingroup EXAMPLES
+#include "MEDCouplingCorbaServant.idl"
 
-This package contains the interface CALCULATOR_ORB used 
-for  %CALCULATOR component as an example in %SALOME application.
+/*!
+  \ingroup EXAMPLES
+  This package contains the interface CALCULATOR_ORB used 
+  for %CALCULATOR component as an example in %SALOME application.
 */
+
 module CALCULATOR_ORB
 {
-  /*! \brief Interface of the %CALCULATOR component
-   */
-  interface CALCULATOR_Gen : Engines::Component
+  /*!
+    \brief Enumeration ErrorCode contains a code of the error
+  */
+  typedef long ErrorCode;
+  const ErrorCode RES_OK = 0;
+  const ErrorCode NOT_COMPATIBLE = 1;
+  const ErrorCode EXCEPTION_RAISED = 2;
+  const ErrorCode INVALID_FIELD = 3;
+       
+  /*!
+    \brief Interface of the %CALCULATOR component
+  */
+  interface CALCULATOR_Gen : Engines::EngineComponent
   {
-     /*!
-         Calculate the maximum relative difference of field with the previous one.
-         At first call, store passed field and return 1.
-      */
-     double convergenceCriteria(in SALOME_MED::FIELDDOUBLE field);
-     /*!
-         Apply to each (scalar) field component the linear function x -> ax+b.
-         Release field1 after use.
-      */
-     SALOME_MED::FIELDDOUBLE applyLin(in SALOME_MED::FIELDDOUBLE field1, in double a1, in double a2);
-
-     /*!
-         Addition of fields. 
-        Return exception if fields are not compatible.
-         Release field1 and field2 after use.
-     */
-     SALOME_MED::FIELDDOUBLE add(in SALOME_MED::FIELDDOUBLE field1, in SALOME_MED::FIELDDOUBLE field2)
-        raises (SALOME::SALOME_Exception);
+    /*!
+      \brief Calculate maximum relative difference of field with the previous one.
+      At first call store passed field and return 1.
+    */
+    double convergenceCriteria(in SALOME_MED::MEDCouplingFieldDoubleCorbaInterface field);
 
-     /*!
-        return euclidian norm of field
-         Release field after use.
-      */
-     double norm2(in SALOME_MED::FIELDDOUBLE field);
+    /*!
+      \brief Apply to each (scalar) field component the linear function x -> ax+b.
+      Release field1 after use.
+    */
+    SALOME_MED::MEDCouplingFieldDoubleCorbaInterface applyLin(in SALOME_MED::MEDCouplingFieldDoubleCorbaInterface field,
+                                                             in double a, in double b);
 
-     /*!
-        return L2 norm of field
-         Release field after use.
-      */
-     double normL2(in SALOME_MED::FIELDDOUBLE field);
+    /*!
+      \brief Sum two fields. 
+      Release field1 and field2 after use.
+    */
+    SALOME_MED::MEDCouplingFieldDoubleCorbaInterface add(in SALOME_MED::MEDCouplingFieldDoubleCorbaInterface field1,
+                                                        in SALOME_MED::MEDCouplingFieldDoubleCorbaInterface field2);
 
-     /*!
-        return L1 norm of field
-         Release field after use.
-      */
-     double normL1(in SALOME_MED::FIELDDOUBLE field);
+    /*!
+      \brief Get Euclidian norm of field
+      Release field after use.
+    */
+    double norm2(in SALOME_MED::MEDCouplingFieldDoubleCorbaInterface field);
 
+    /*!
+      \brief Get L2 norm of field
+      Release field after use.
+    */
+    double normL2(in SALOME_MED::MEDCouplingFieldDoubleCorbaInterface field);
+    
      /*!
-        return max norm of field
-         Release field after use.
-      */
-     double normMax(in SALOME_MED::FIELDDOUBLE field);
-
-     /*!
-         This utility method print in standard output the coordinates & field values
-         Release field after use.
-      */
-     void printField(in SALOME_MED::FIELDDOUBLE field);
-
-     /*!
-         This method clones field in four examples.
-         Release field after use.
-      */
-     void cloneField(in SALOME_MED::FIELDDOUBLE field, out SALOME_MED::FIELDDOUBLE clone1, 
-                     out SALOME_MED::FIELDDOUBLE clone2, out SALOME_MED::FIELDDOUBLE clone3,
-                    out SALOME_MED::FIELDDOUBLE clone4 );
+       \brief Get L1 norm of field
+       Release field after use.
+     */
+    double normL1(in SALOME_MED::MEDCouplingFieldDoubleCorbaInterface field);
+    
+    /*!
+      \brief Get max norm of field
+      Release field after use.
+    */
+    double normMax(in SALOME_MED::MEDCouplingFieldDoubleCorbaInterface field);
+    
+    /*!
+      \brief Print out the coordinates and field values to standard output
+      Release field after use.
+    */
+    void printField(in SALOME_MED::MEDCouplingFieldDoubleCorbaInterface field);
+    
+    /*!
+      \brief Clone source field into four copies.
+      Release field after use.
+    */
+    void cloneField(in  SALOME_MED::MEDCouplingFieldDoubleCorbaInterface field,
+                   out SALOME_MED::MEDCouplingFieldDoubleCorbaInterface clone1, 
+                   out SALOME_MED::MEDCouplingFieldDoubleCorbaInterface clone2,
+                   out SALOME_MED::MEDCouplingFieldDoubleCorbaInterface clone3,
+                   out SALOME_MED::MEDCouplingFieldDoubleCorbaInterface clone4);
+    
+    /*!
+      \brief Get last operation status; returns \c True if last operation succeded,
+      otherwise returns \c False.
+    */
+    boolean isDone();
+    
+    /*!
+      \brief Get last error code
+    */
+    ErrorCode getErrorCode();
   };
 };
 
 #endif
-