1 // Copyright (C) 2007-2019 CEA/DEN, EDF R&D, OPEN CASCADE
3 // Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
4 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
6 // This library is free software; you can redistribute it and/or
7 // modify it under the terms of the GNU Lesser General Public
8 // License as published by the Free Software Foundation; either
9 // version 2.1 of the License, or (at your option) any later version.
11 // This library is distributed in the hope that it will be useful,
12 // but WITHOUT ANY WARRANTY; without even the implied warranty of
13 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 // Lesser General Public License for more details.
16 // You should have received a copy of the GNU Lesser General Public
17 // License along with this library; if not, write to the Free Software
18 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
20 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
23 #include "AdvancedEngine_OperationsCreator.hxx"
24 #include "AdvancedEngine_IOperations_i.hh"
25 #include "AdvancedEngine_IOperations.hxx"
26 #include <AdvancedEngine_PipeTShapeDriver.hxx>
27 #include <AdvancedEngine_DividedDiskDriver.hxx>
28 #include <AdvancedEngine_SmoothingSurfaceDriver.hxx>
30 #include <TFunction_Driver.hxx>
31 #include <TFunction_DriverTable.hxx>
33 #include "Utils_ExceptHandlers.hxx"
34 #include "utilities.h"
36 AdvancedEngine_IOperations* AdvancedEngine_OperationsCreator::_operation;
38 AdvancedEngine_OperationsCreator::AdvancedEngine_OperationsCreator()
41 TFunction_DriverTable::Get()->AddDriver(AdvancedEngine_PipeTShapeDriver::GetID(),
42 new AdvancedEngine_PipeTShapeDriver());
43 TFunction_DriverTable::Get()->AddDriver(AdvancedEngine_DividedDiskDriver::GetID(),
44 new AdvancedEngine_DividedDiskDriver());
45 TFunction_DriverTable::Get()->AddDriver(AdvancedEngine_SmoothingSurfaceDriver::GetID(),
46 new AdvancedEngine_SmoothingSurfaceDriver());
49 AdvancedEngine_OperationsCreator::~AdvancedEngine_OperationsCreator()
53 GEOM_IOperations_i* AdvancedEngine_OperationsCreator::Create (PortableServer::POA_ptr thePOA,
54 GEOM::GEOM_Gen_ptr theEngine,
55 ::GEOMImpl_Gen* theGenImpl)
57 Unexpect aCatch(SALOME_SalomeException);
58 MESSAGE( "AdvancedEngine_OperationsCreator::Create" );
59 return new AdvancedEngine_IOperations_i( thePOA, theEngine, get( theGenImpl ) );
62 AdvancedEngine_IOperations* AdvancedEngine_OperationsCreator::get( ::GEOMImpl_Gen* theGenImpl )
65 _operation = new AdvancedEngine_IOperations( theGenImpl );