Salome HOME
fix conflict
[modules/med.git] / src / MEDCalc / cmp / MEDCalculator_i.hxx
1 // Copyright (C) 2007-2015  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, or (at your option) any later version.
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
20 // Authors : Guillaume Boulant (EDF) - 01/06/2011
21
22 #ifndef _MED_CALCULATOR_I_HXX_
23 #define _MED_CALCULATOR_I_HXX_
24
25 #include <SALOMEconfig.h>
26 #include CORBA_SERVER_HEADER(MEDDataManager)
27 #include CORBA_SERVER_HEADER(MEDCalculator)
28 #include "SALOME_GenericObj_i.hh"
29
30 #include "MEDDataManager_i.hxx"
31
32 #include "MEDCALC.hxx"
33 class MEDCALC_EXPORT MEDCalculator_i: public POA_MEDCALC::MEDCalculator,
34             public SALOME::GenericObj_i
35 {
36 public:
37
38   //
39   // ===========================================================
40   // Functions specified in the IDL interface
41   // ===========================================================
42   //
43   MEDCALC::FieldHandler * add(const MEDCALC::FieldHandler & f1_hdl, const MEDCALC::FieldHandler & f2_hdl);
44   MEDCALC::FieldHandler * sub(const MEDCALC::FieldHandler & f1_hdl, const MEDCALC::FieldHandler & f2_hdl);
45   MEDCALC::FieldHandler * mul(const MEDCALC::FieldHandler & f1_hdl, const MEDCALC::FieldHandler & f2_hdl);
46   MEDCALC::FieldHandler * div(const MEDCALC::FieldHandler & f1_hdl, const MEDCALC::FieldHandler & f2_hdl);
47   MEDCALC::FieldHandler * pow(const MEDCALC::FieldHandler & f_hdl, CORBA::Long power);
48   MEDCALC::FieldHandler * lin(const MEDCALC::FieldHandler & f_hdl, double factor, double offset);
49   MEDCALC::FieldHandler * dup(const MEDCALC::FieldHandler & f_hdl);
50
51   MEDCALC::FieldHandler * fct(const MEDCALC::FieldHandler & f_hdl,
52           const char * function, CORBA::Long nbResComponents);
53
54   //
55   // ===========================================================
56   // Other public functions (non available via CORBA)
57   // ===========================================================
58   //
59   static MEDCalculator_i * getInstance();
60
61 private:
62   MEDCalculator_i();
63   ~MEDCalculator_i();
64
65   // The MEDCalculator is a singleton, whose instance can be obtained
66   // using the getInstance static method.
67   static MEDCalculator_i * _instance;
68
69   MEDDataManager_i * _medDataManager;
70 };
71
72 #endif // _MED_CALCULATOR_I_HXX_