Salome HOME
Merge from V6_main (04/10/2012)
[modules/med.git] / src / MEDOP / cmp / MEDCalculator_i.hxx
1 // Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
2 //
3 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
5 //
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.
10 //
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.
15 //
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
19 //
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
21 //
22
23 // Authors : Guillaume Boulant (EDF) - 01/06/2011
24
25 #ifndef _MED_CALCULATOR_I_HXX_
26 #define _MED_CALCULATOR_I_HXX_
27
28 #include <SALOMEconfig.h>
29 #include CORBA_SERVER_HEADER(MEDDataManager)
30 #include CORBA_SERVER_HEADER(MEDCalculator)
31 #include "SALOME_GenericObj_i.hh"
32
33 #include "MEDDataManager_i.hxx"
34
35 #include "MEDOP.hxx"
36 class MEDOP_EXPORT MEDCalculator_i: public POA_MEDOP::MEDCalculator,
37                                     public SALOME::GenericObj_i
38 {
39 public:
40
41   // 
42   // ===========================================================
43   // Functions specified in the IDL interface
44   // ===========================================================
45   //
46   MEDOP::FieldHandler * add(const MEDOP::FieldHandler & f1_hdl, const MEDOP::FieldHandler & f2_hdl);
47   MEDOP::FieldHandler * sub(const MEDOP::FieldHandler & f1_hdl, const MEDOP::FieldHandler & f2_hdl);
48   MEDOP::FieldHandler * mul(const MEDOP::FieldHandler & f1_hdl, const MEDOP::FieldHandler & f2_hdl);
49   MEDOP::FieldHandler * div(const MEDOP::FieldHandler & f1_hdl, const MEDOP::FieldHandler & f2_hdl);
50   MEDOP::FieldHandler * pow(const MEDOP::FieldHandler & f_hdl, CORBA::Long power);
51   MEDOP::FieldHandler * lin(const MEDOP::FieldHandler & f_hdl, double factor, double offset);
52   MEDOP::FieldHandler * dup(const MEDOP::FieldHandler & f_hdl);
53
54   MEDOP::FieldHandler * fct(const MEDOP::FieldHandler & f_hdl,
55                             const char * function, CORBA::Long nbResComponents);
56
57   // 
58   // ===========================================================
59   // Other public functions (non available via CORBA)
60   // ===========================================================
61   //
62   static MEDCalculator_i * getInstance();
63
64 private:
65   MEDCalculator_i();
66   ~MEDCalculator_i();
67
68   // The MEDCalculator is a singleton, whose instance can be obtained
69   // using the getInstance static method.
70   static MEDCalculator_i * _instance;
71
72   MEDDataManager_i * _medDataManager;
73 };
74
75 #endif // _MED_CALCULATOR_I_HXX_