1 // Copyright (C) 2007-2014 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 "MEDOPFactory_i.hxx"
23 #include "utilities.h"
27 #include "MEDDataManager_i.hxx"
28 #include "MEDCalculator_i.hxx"
32 //=============================================================================
34 * standard constructor
36 //=============================================================================
38 MEDOPFactory_i::MEDOPFactory_i(CORBA::ORB_ptr orb,
39 PortableServer::POA_ptr poa,
40 PortableServer::ObjectId * contId,
41 const char *instanceName,
42 const char *interfaceName) :
43 Engines_Component_i(orb, poa, contId, instanceName, interfaceName)
45 MESSAGE("activate object");
47 _id = _poa->activate_object(_thisObj);
50 MEDOPFactory_i::~MEDOPFactory_i()
54 MEDOP::MEDDataManager_ptr MEDOPFactory_i::getDataManager() {
55 MEDDataManager_i * medDataManager = MEDDataManager_i::getInstance();
56 MEDOP::MEDDataManager_ptr medDataManagerPtr = medDataManager->_this();
57 return medDataManagerPtr;
60 MEDOP::MEDCalculator_ptr MEDOPFactory_i::getCalculator() {
61 MEDCalculator_i * medCalculator = MEDCalculator_i::getInstance();
62 MEDOP::MEDCalculator_ptr medCalculatorPtr = medCalculator->_this();
63 return medCalculatorPtr;
68 PortableServer::ObjectId * MEDOPFactoryEngine_factory(
70 PortableServer::POA_ptr poa,
71 PortableServer::ObjectId * contId,
72 const char *instanceName,
73 const char *interfaceName)
75 MESSAGE("PortableServer::ObjectId * MEDOPEngine_factory()");
76 SCRUTE(interfaceName);
77 MEDOPFactory_i * factory = new MEDOPFactory_i(orb, poa, contId,
80 return factory->getId() ;