Salome HOME
updated copyright message
[modules/geom.git] / src / BREPPlugin / BREPPlugin_OperationsCreator.cxx
index 7e55ee0443fb06468d15962e7e185d06b3efd0aa..23aae2a54e02b8ee82ecfcfccd71affeb0430cc2 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2014-2016  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2014-2023  CEA, EDF, OPEN CASCADE
 //
 // This library is free software; you can redistribute it and/or
 // modify it under the terms of the GNU Lesser General Public
@@ -32,7 +32,7 @@
 // OCCT includes
 #include <TFunction_DriverTable.hxx>
 
-std::map <int, BREPPlugin_IOperations*> BREPPlugin_OperationsCreator::_mapOfOperations;
+BREPPlugin_IOperations* BREPPlugin_OperationsCreator::_operation;
 
 BREPPlugin_OperationsCreator::BREPPlugin_OperationsCreator()
 {
@@ -51,19 +51,17 @@ BREPPlugin_OperationsCreator::~BREPPlugin_OperationsCreator()
 }
 
 GEOM_IOperations_i* BREPPlugin_OperationsCreator::Create( PortableServer::POA_ptr thePOA,
-                                                          int                     theStudyId,
                                                           GEOM::GEOM_Gen_ptr      theEngine,
                                                           ::GEOMImpl_Gen*         theGenImpl )
 {
   Unexpect aCatch( SALOME_SalomeException );
   MESSAGE( "BREPPlugin_OperationsCreator::Create" );
-  return new BREPPlugin_IOperations_i( thePOA, theEngine, get( theGenImpl, theStudyId ) );
+  return new BREPPlugin_IOperations_i( thePOA, theEngine, get( theGenImpl ) );
 }
 
-BREPPlugin_IOperations* BREPPlugin_OperationsCreator::get( ::GEOMImpl_Gen* theGenImpl,
-                                                          int             theStudyId )
+BREPPlugin_IOperations* BREPPlugin_OperationsCreator::get( ::GEOMImpl_Gen* theGenImpl )
 {
-  if (_mapOfOperations.find( theStudyId ) == _mapOfOperations.end() )
-    _mapOfOperations[theStudyId] = new BREPPlugin_IOperations( theGenImpl, theStudyId );
-  return _mapOfOperations[theStudyId];
+  if( !_operation )
+    _operation = new BREPPlugin_IOperations( theGenImpl );
+  return _operation;
 }