X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FAdvancedEngine%2FAdvancedEngine_OperationsCreator.cxx;fp=src%2FAdvancedEngine%2FAdvancedEngine_OperationsCreator.cxx;h=40c79e2101906a97fe4dc6a1b36a94b8e54f0313;hb=a79bb581539a0e5da23cce26b57da8e322412f13;hp=f7d3603fa2bb105bd9062df2338cc26cb53b1d27;hpb=61e3f7e90a35ce43ffbd180213da56d493979f41;p=modules%2Fgeom.git diff --git a/src/AdvancedEngine/AdvancedEngine_OperationsCreator.cxx b/src/AdvancedEngine/AdvancedEngine_OperationsCreator.cxx index f7d3603fa..40c79e210 100644 --- a/src/AdvancedEngine/AdvancedEngine_OperationsCreator.cxx +++ b/src/AdvancedEngine/AdvancedEngine_OperationsCreator.cxx @@ -33,7 +33,7 @@ #include "Utils_ExceptHandlers.hxx" #include "utilities.h" -std::map AdvancedEngine_OperationsCreator::_mapOfOperations; +AdvancedEngine_IOperations* AdvancedEngine_OperationsCreator::_operation; AdvancedEngine_OperationsCreator::AdvancedEngine_OperationsCreator() { @@ -51,19 +51,17 @@ AdvancedEngine_OperationsCreator::~AdvancedEngine_OperationsCreator() } GEOM_IOperations_i* AdvancedEngine_OperationsCreator::Create (PortableServer::POA_ptr thePOA, - int theStudyId, GEOM::GEOM_Gen_ptr theEngine, ::GEOMImpl_Gen* theGenImpl) { Unexpect aCatch(SALOME_SalomeException); MESSAGE( "AdvancedEngine_OperationsCreator::Create" ); - return new AdvancedEngine_IOperations_i( thePOA, theEngine, get( theGenImpl, theStudyId ) ); + return new AdvancedEngine_IOperations_i( thePOA, theEngine, get( theGenImpl ) ); } -AdvancedEngine_IOperations* AdvancedEngine_OperationsCreator::get( ::GEOMImpl_Gen* theGenImpl, - int theStudyId ) +AdvancedEngine_IOperations* AdvancedEngine_OperationsCreator::get( ::GEOMImpl_Gen* theGenImpl ) { - if (_mapOfOperations.find( theStudyId ) == _mapOfOperations.end() ) - _mapOfOperations[theStudyId] = new AdvancedEngine_IOperations( theGenImpl, theStudyId ); - return _mapOfOperations[theStudyId]; + if( !_operation ) + _operation = new AdvancedEngine_IOperations( theGenImpl ); + return _operation; }