Salome HOME
Join modifications from branch BR_DEBUG_3_2_0b1
[samples/calculator.git] / src / CALCULATOR / CALCULATOR.hxx
1 // Copyright (C) 2005  CEA/DEN, EDF R&D
2 //
3 // This library is free software; you can redistribute it and/or
4 // modify it under the terms of the GNU Lesser General Public
5 // License as published by the Free Software Foundation; either
6 // version 2.1 of the License.
7 //
8 // This library is distributed in the hope that it will be useful
9 // but WITHOUT ANY WARRANTY; without even the implied warranty of
10 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
11 // Lesser General Public License for more details.
12 //
13 // You should have received a copy of the GNU Lesser General Public
14 // License along with this library; if not, write to the Free Software
15 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
16 //
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
18 //
19 #ifndef _CALCULATOR_HXX_
20 #define _CALCULATOR_HXX_
21
22 #include <SALOMEconfig.h>
23 #include CORBA_SERVER_HEADER(CALCULATOR_Gen)
24 #include CORBA_CLIENT_HEADER(MED)
25 #include "SALOME_Component_i.hxx"
26
27 class CALCULATOR:
28   public POA_CALCULATOR_ORB::CALCULATOR_Gen,
29   public Engines_Component_i 
30 {
31
32 public:
33     CALCULATOR(CORBA::ORB_ptr orb,
34             PortableServer::POA_ptr poa,
35             PortableServer::ObjectId * contId, 
36             const char *instanceName, 
37             const char *interfaceName);
38     virtual ~CALCULATOR();
39
40     CORBA::Double convergenceCriteria(SALOME_MED::FIELDDOUBLE_ptr field);
41     CORBA::Double normMax(SALOME_MED::FIELDDOUBLE_ptr field1);
42     CORBA::Double normL2(SALOME_MED::FIELDDOUBLE_ptr field1);
43     CORBA::Double norm2(SALOME_MED::FIELDDOUBLE_ptr field1);
44     CORBA::Double normL1(SALOME_MED::FIELDDOUBLE_ptr field1);
45     SALOME_MED::FIELDDOUBLE_ptr applyLin(SALOME_MED::FIELDDOUBLE_ptr field1,CORBA::Double a,CORBA::Double b);
46     SALOME_MED::FIELDDOUBLE_ptr add(SALOME_MED::FIELDDOUBLE_ptr field1, SALOME_MED::FIELDDOUBLE_ptr field2)
47         throw ( SALOME::SALOME_Exception );
48     void printField(SALOME_MED::FIELDDOUBLE_ptr field);
49     void cloneField(SALOME_MED::FIELDDOUBLE_ptr field, SALOME_MED::FIELDDOUBLE_out clone1, SALOME_MED::FIELDDOUBLE_out clone2,
50                     SALOME_MED::FIELDDOUBLE_out clone3, SALOME_MED::FIELDDOUBLE_out clone4);
51 };
52
53
54 extern "C"
55     PortableServer::ObjectId * CALCULATOREngine_factory(
56             CORBA::ORB_ptr orb,
57             PortableServer::POA_ptr poa,
58             PortableServer::ObjectId * contId,
59             const char *instanceName,
60             const char *interfaceName);
61
62
63 #endif