1 // Copyright (C) 2007-2015 CEA/DEN, EDF R&D
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.
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.
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
17 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
20 // Authors : Guillaume Boulant (EDF) - 01/06/2011
22 #include "MEDFactory_i.hxx"
23 #include "utilities.h"
27 #include "MEDDataManager_i.hxx"
28 #include "MEDCalculator_i.hxx"
29 #include "MEDPresentationManager_i.hxx"
33 //=============================================================================
35 * standard constructor
37 //=============================================================================
39 MEDFactory_i::MEDFactory_i(CORBA::ORB_ptr orb,
40 PortableServer::POA_ptr poa,
41 PortableServer::ObjectId * contId,
42 const char *instanceName,
43 const char *interfaceName) :
44 Engines_Component_i(orb, poa, contId, instanceName, interfaceName)
46 MESSAGE("activate object");
48 _id = _poa->activate_object(_thisObj);
51 MEDFactory_i::~MEDFactory_i()
55 MEDCALC::MEDDataManager_ptr MEDFactory_i::getDataManager() {
56 MEDDataManager_i * medDataManager = MEDDataManager_i::getInstance();
57 MEDCALC::MEDDataManager_ptr medDataManagerPtr = medDataManager->_this();
58 return medDataManagerPtr;
61 MEDCALC::MEDCalculator_ptr MEDFactory_i::getCalculator() {
62 MEDCalculator_i * medCalculator = MEDCalculator_i::getInstance();
63 MEDCALC::MEDCalculator_ptr medCalculatorPtr = medCalculator->_this();
64 return medCalculatorPtr;
67 MEDCALC::MEDPresentationManager_ptr MEDFactory_i::getPresentationManager() {
68 MEDPresentationManager_i * manager = MEDPresentationManager_i::getInstance();
69 MEDCALC::MEDPresentationManager_ptr managerPtr = manager->_this();
75 PortableServer::ObjectId * MEDFactoryEngine_factory(
77 PortableServer::POA_ptr poa,
78 PortableServer::ObjectId * contId,
79 const char *instanceName,
80 const char *interfaceName)
82 MESSAGE("PortableServer::ObjectId * MEDEngine_factory()");
83 SCRUTE(interfaceName);
84 MEDFactory_i * factory = new MEDFactory_i(orb, poa, contId,
87 return factory->getId() ;