X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSTEPPlugin%2FSTEPPlugin_OperationsCreator.cxx;h=d9b41000070bcd54a47db39301d14e5959bcff3b;hb=c1d63ef1f803d255b61ee99fb618bf471add07f4;hp=d3d31a18d4f66fd4d43b2ca04b77b9acd7a3b685;hpb=aeddae77192d933be1aee8855d8f7c525878cad9;p=modules%2Fgeom.git diff --git a/src/STEPPlugin/STEPPlugin_OperationsCreator.cxx b/src/STEPPlugin/STEPPlugin_OperationsCreator.cxx index d3d31a18d..d9b410000 100644 --- a/src/STEPPlugin/STEPPlugin_OperationsCreator.cxx +++ b/src/STEPPlugin/STEPPlugin_OperationsCreator.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2014 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2014-2023 CEA/DEN, EDF R&D, OPEN CASCADE // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -35,7 +35,7 @@ // OCCT includes #include -std::map STEPPlugin_OperationsCreator::_mapOfOperations; +STEPPlugin_IOperations* STEPPlugin_OperationsCreator::_operation; STEPPlugin_OperationsCreator::STEPPlugin_OperationsCreator() { @@ -56,19 +56,17 @@ STEPPlugin_OperationsCreator::~STEPPlugin_OperationsCreator() } GEOM_IOperations_i* STEPPlugin_OperationsCreator::Create( PortableServer::POA_ptr thePOA, - int theStudyId, GEOM::GEOM_Gen_ptr theEngine, ::GEOMImpl_Gen* theGenImpl ) { Unexpect aCatch( SALOME_SalomeException ); MESSAGE( "STEPPlugin_OperationsCreator::Create" ); - return new STEPPlugin_IOperations_i( thePOA, theEngine, get( theGenImpl, theStudyId ) ); + return new STEPPlugin_IOperations_i( thePOA, theEngine, get(theGenImpl) ); } -STEPPlugin_IOperations* STEPPlugin_OperationsCreator::get( ::GEOMImpl_Gen* theGenImpl, - int theStudyId ) +STEPPlugin_IOperations* STEPPlugin_OperationsCreator::get( ::GEOMImpl_Gen* theGenImpl ) { - if (_mapOfOperations.find( theStudyId ) == _mapOfOperations.end() ) - _mapOfOperations[theStudyId] = new STEPPlugin_IOperations( theGenImpl, theStudyId ); - return _mapOfOperations[theStudyId]; + if( !_operation ) + _operation = new STEPPlugin_IOperations( theGenImpl ); + return _operation; }