Salome HOME
medcalc and commands history
[modules/med.git] / src / MEDOP / 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 "MEDOP.hxx"
33 class MEDOP_EXPORT MEDCalculator_i: public POA_MEDOP::MEDCalculator,
34             public SALOME::GenericObj_i
35 {
36 public:
37
38   // 
39   // ===========================================================
40   // Functions specified in the IDL interface
41   // ===========================================================
42   //
43   MEDOP::FieldHandler * add(const MEDOP::FieldHandler & f1_hdl, const MEDOP::FieldHandler & f2_hdl);
44   MEDOP::FieldHandler * sub(const MEDOP::FieldHandler & f1_hdl, const MEDOP::FieldHandler & f2_hdl);
45   MEDOP::FieldHandler * mul(const MEDOP::FieldHandler & f1_hdl, const MEDOP::FieldHandler & f2_hdl);
46   MEDOP::FieldHandler * div(const MEDOP::FieldHandler & f1_hdl, const MEDOP::FieldHandler & f2_hdl);
47   MEDOP::FieldHandler * pow(const MEDOP::FieldHandler & f_hdl, CORBA::Long power);
48   MEDOP::FieldHandler * lin(const MEDOP::FieldHandler & f_hdl, double factor, double offset);
49   MEDOP::FieldHandler * dup(const MEDOP::FieldHandler & f_hdl);
50
51   MEDOP::FieldHandler * fct(const MEDOP::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_