1 // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either
7 // version 2.1 of the License.
9 // This library is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // Lesser General Public License for more details.
14 // You should have received a copy of the GNU Lesser General Public
15 // License along with this library; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 // See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
22 // File : CalculatorEngine.hxx
23 // Author : Laurent DADA, CEA
24 // Module : CalculatorComponent
27 #ifndef _CALCULATORWRAPPER_HXX_
28 #define _CALCULATORWRAPPER_HXX_
32 #include <SALOMEconfig.h>
33 #include CORBA_SERVER_HEADER(Calculator)
34 #include "SALOME_Component_i.hxx"
35 #include CORBA_CLIENT_HEADER(MED)
36 #include "MEDMEM_Med_i.hxx"
37 #include "MEDMEM_Field.hxx"
38 #include "MEDMEM_FieldDouble_i.hxx"
40 #include "SALOME_NamingService.hxx"
42 class CalculatorEngine :
43 virtual public POA_SuperVisionTest::Calculator,
44 public Engines_Component_i
49 CalculatorEngine( CORBA::ORB_ptr orb,
50 PortableServer::POA_ptr poa,
51 PortableServer::ObjectId * contId,
52 const char *instanceName,
53 const char *interfaceName);
55 virtual ~CalculatorEngine();
58 SALOME_MED::FIELDDOUBLE_ptr PutToStudy(SALOME_MED::FIELDDOUBLE_ptr theField,
61 SALOME_MED::FIELDDOUBLE_ptr Add(SALOME_MED::FIELDDOUBLE_ptr FirstField,
62 SALOME_MED::FIELDDOUBLE_ptr SecondField);
64 SALOME_MED::FIELDDOUBLE_ptr Mul(SALOME_MED::FIELDDOUBLE_ptr OldField,
67 SALOME_MED::FIELDDOUBLE_ptr Constant(SALOME_MED::FIELDDOUBLE_ptr FirstField,
70 void writeMEDfile(SALOME_MED::FIELDDOUBLE_ptr field1 ,
71 const char *fileName);
75 SALOME_NamingService * _NS ;
80 PortableServer::ObjectId * CalculatorEngine_factory
82 PortableServer::POA_ptr poa ,
83 PortableServer::ObjectId * contId ,
84 const char *instanceName ,
85 const char *interfaceName ) ;