1 // Copyright (C) 2007-2013 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
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.
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.
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
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
23 // File : CalculatorEngine.hxx
24 // Author : Laurent DADA, CEA
25 // Module : CalculatorComponent
28 #ifndef _CALCULATORWRAPPER_HXX_
29 #define _CALCULATORWRAPPER_HXX_
33 #include <SALOMEconfig.h>
34 #include CORBA_SERVER_HEADER(Calculator)
35 #include "SALOME_Component_i.hxx"
36 #include CORBA_CLIENT_HEADER(MED)
37 #include "MEDMEM_Med_i.hxx"
38 #include "MEDMEM_Field.hxx"
39 #include "MEDMEM_FieldTemplate_i.hxx"
41 #include "SALOME_NamingService.hxx"
43 class CalculatorEngine :
44 virtual public POA_SuperVisionTest::Calculator,
45 public Engines_Component_i
50 CalculatorEngine( CORBA::ORB_ptr orb,
51 PortableServer::POA_ptr poa,
52 PortableServer::ObjectId * contId,
53 const char *instanceName,
54 const char *interfaceName);
56 virtual ~CalculatorEngine();
58 virtual char* getVersion();
60 SALOME_MED::FIELDDOUBLE_ptr PutToStudy(SALOME_MED::FIELDDOUBLE_ptr theField,
61 CORBA::Long theStudyId);
63 SALOME_MED::FIELDDOUBLE_ptr Add(SALOME_MED::FIELDDOUBLE_ptr FirstField,
64 SALOME_MED::FIELDDOUBLE_ptr SecondField);
66 SALOME_MED::FIELDDOUBLE_ptr Mul(SALOME_MED::FIELDDOUBLE_ptr OldField,
69 SALOME_MED::FIELDDOUBLE_ptr Constant(SALOME_MED::FIELDDOUBLE_ptr FirstField,
72 void writeMEDfile(SALOME_MED::FIELDDOUBLE_ptr field1 ,
73 const char *fileName);
77 SALOME_NamingService * _NS ;
82 PortableServer::ObjectId * CalculatorEngine_factory
84 PortableServer::POA_ptr poa ,
85 PortableServer::ObjectId * contId ,
86 const char *instanceName ,
87 const char *interfaceName ) ;