Salome HOME
Updated copyright comment
[modules/med.git] / src / MEDCalc / cmp / MEDFactory_i.cxx
1 // Copyright (C) 2007-2024  CEA, EDF
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 #include "MEDFactory_i.hxx"
23 #include "utilities.h"
24
25 #include "MEDDataManager_i.hxx"
26 #include "MEDCalculator_i.hxx"
27 #include "MEDPresentationManager_i.hxx"
28 #include "MEDCommandsHistoryManager_i.hxx"
29
30 //=============================================================================
31 /*!
32  *  standard constructor
33  */
34 //=============================================================================
35
36 MEDFactory_i::MEDFactory_i(CORBA::ORB_ptr orb,
37                            PortableServer::POA_ptr poa,
38                            PortableServer::ObjectId* contId,
39                            const char* instanceName,
40                            const char* interfaceName,
41                                                    bool checkNS)
42   : Engines_Component_i(orb, poa, contId, instanceName, interfaceName, false, checkNS)
43 {
44   MESSAGE("activate object");
45   _thisObj = this ;
46   _id = _poa->activate_object(_thisObj);
47 }
48
49 MEDFactory_i::~MEDFactory_i()
50 {
51   // nothing to do
52 }
53
54 MEDCALC::MEDDataManager_ptr
55 MEDFactory_i::getDataManager()
56 {
57   MEDDataManager_i* medDataManager = MEDDataManager_i::getInstance();
58   MEDCALC::MEDDataManager_ptr medDataManagerPtr = medDataManager->_this();
59   return medDataManagerPtr;
60 }
61
62 MEDCALC::MEDCalculator_ptr
63 MEDFactory_i::getCalculator()
64 {
65   MEDCalculator_i* medCalculator = MEDCalculator_i::getInstance();
66   MEDCALC::MEDCalculator_ptr medCalculatorPtr = medCalculator->_this();
67   return medCalculatorPtr;
68 }
69
70 MEDCALC::MEDPresentationManager_ptr
71 MEDFactory_i::getPresentationManager()
72 {
73   MEDPresentationManager_i* manager = MEDPresentationManager_i::getInstance();
74   MEDCALC::MEDPresentationManager_ptr managerPtr = manager->_this();
75   return managerPtr;
76 }
77
78 MEDCALC::MEDCommandsHistoryManager_ptr
79 MEDFactory_i::getCommandsHistoryManager()
80 {
81   MEDCommandsHistoryManager_i* manager = MEDCommandsHistoryManager_i::getInstance();
82   MEDCALC::MEDCommandsHistoryManager_ptr managerPtr = manager->_this();
83   return managerPtr;
84 }