X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=idl%2FCALCULATOR_Gen.idl;h=7993320e43a873e7850891fd137b10accb3dae18;hb=1b2aaea8bf36ee1b1f41c1e96e06bdbae5d0bda7;hp=d5dfec05817d496ebb9d1528847ea7ca8dfb7b94;hpb=e1803fa106a2e37d38dc03d62fa467e95c17cf6b;p=samples%2Fcalculator.git diff --git a/idl/CALCULATOR_Gen.idl b/idl/CALCULATOR_Gen.idl index d5dfec0..7993320 100644 --- a/idl/CALCULATOR_Gen.idl +++ b/idl/CALCULATOR_Gen.idl @@ -1,11 +1,14 @@ -// Copyright (C) 2005 CEA/DEN, EDF R&D +// Copyright (C) 2007-2014 CEA/DEN, EDF R&D, 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. @@ -16,6 +19,7 @@ // // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // + #ifndef __CALCULATOR_GEN__ #define __CALCULATOR_GEN__ /*! @@ -24,7 +28,7 @@ #include "SALOME_Component.idl" #include "SALOME_Exception.idl" -#include "MED.idl" +#include "MEDCouplingCorbaServant.idl" /*! \ingroup EXAMPLES @@ -34,68 +38,86 @@ for %CALCULATOR component as an example in %SALOME application. */ module CALCULATOR_ORB { + /*! + 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::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); + double convergenceCriteria(in SALOME_MED::MEDCouplingFieldDoubleCorbaInterface 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); + SALOME_MED::MEDCouplingFieldDoubleCorbaInterface applyLin(in SALOME_MED::MEDCouplingFieldDoubleCorbaInterface 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); + SALOME_MED::MEDCouplingFieldDoubleCorbaInterface add(in SALOME_MED::MEDCouplingFieldDoubleCorbaInterface field1, in SALOME_MED::MEDCouplingFieldDoubleCorbaInterface field2); /*! return euclidian norm of field Release field after use. */ - double norm2(in SALOME_MED::FIELDDOUBLE field); + double norm2(in SALOME_MED::MEDCouplingFieldDoubleCorbaInterface field); /*! return L2 norm of field Release field after use. */ - double normL2(in SALOME_MED::FIELDDOUBLE field); + double normL2(in SALOME_MED::MEDCouplingFieldDoubleCorbaInterface field); /*! return L1 norm of field Release field after use. */ - double normL1(in SALOME_MED::FIELDDOUBLE field); + double normL1(in SALOME_MED::MEDCouplingFieldDoubleCorbaInterface field); /*! return max norm of field Release field after use. */ - double normMax(in SALOME_MED::FIELDDOUBLE field); + double normMax(in SALOME_MED::MEDCouplingFieldDoubleCorbaInterface field); /*! This utility method print in standard output the coordinates & field values Release field after use. */ - void printField(in SALOME_MED::FIELDDOUBLE field); + void printField(in SALOME_MED::MEDCouplingFieldDoubleCorbaInterface 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 ); + 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 ); + + /*! + This method returns True if the operation succeded. + Otherwise returns False. + */ + boolean isDone(); + + /*! + This method return an error code + */ + ErrorCode getErrorCode(); }; }; #endif -