]> SALOME platform Git repositories - modules/geom.git/commitdiff
Salome HOME
- delete dependency from study id mpa/23299_rebase
authormpa <mpa@opencascade.com>
Mon, 10 Oct 2016 14:09:43 +0000 (17:09 +0300)
committermpa <mpa@opencascade.com>
Fri, 14 Oct 2016 07:10:04 +0000 (10:10 +0300)
152 files changed:
resources/GEOMCatalog.xml.in
src/AdvancedEngine/AdvancedEngine_IOperations.cxx
src/AdvancedEngine/AdvancedEngine_IOperations.hxx
src/AdvancedEngine/AdvancedEngine_OperationsCreator.cxx
src/AdvancedEngine/AdvancedEngine_OperationsCreator.hxx
src/AdvancedGUI/AdvancedGUI_PipeTShapeDlg.cxx
src/AdvancedGUI/AdvancedGUI_PipeTShapeDlg.h
src/BREPPlugin/BREPPlugin_GUI.cxx
src/BREPPlugin/BREPPlugin_IECallBack.cxx
src/BREPPlugin/BREPPlugin_IECallBack.hxx
src/BREPPlugin/BREPPlugin_IOperations.cxx
src/BREPPlugin/BREPPlugin_IOperations.hxx
src/BREPPlugin/BREPPlugin_OperationsCreator.cxx
src/BREPPlugin/BREPPlugin_OperationsCreator.hxx
src/BooleanGUI/BooleanGUI_Dialog.cxx
src/BooleanGUI/BooleanGUI_Dialog.h
src/BuildGUI/BuildGUI_CompoundDlg.cxx
src/BuildGUI/BuildGUI_CompoundDlg.h
src/DependencyTree/DependencyTree_ViewModel.cxx
src/DisplayGUI/DisplayGUI.cxx
src/GEOM/GEOM_BaseDriver.cxx
src/GEOM/GEOM_BaseDriver.hxx
src/GEOM/GEOM_BaseObject.cxx
src/GEOM/GEOM_BaseObject.hxx
src/GEOM/GEOM_Engine.cxx
src/GEOM/GEOM_Engine.hxx
src/GEOM/GEOM_Field.cxx
src/GEOM/GEOM_IOperations.cxx
src/GEOM/GEOM_IOperations.hxx
src/GEOM/GEOM_Solver.cxx
src/GEOM/GEOM_Solver.hxx
src/GEOMBase/GEOMBase_Helper.cxx
src/GEOMGUI/GEOMGUI_TextTreeWdg.cxx
src/GEOMGUI/GEOM_Displayer.cxx
src/GEOMGUI/GEOM_Displayer.h
src/GEOMGUI/GeometryGUI.cxx
src/GEOMImpl/GEOMImpl_ExportDriver.cxx
src/GEOMImpl/GEOMImpl_Gen.cxx
src/GEOMImpl/GEOMImpl_Gen.hxx
src/GEOMImpl/GEOMImpl_I3DPrimOperations.cxx
src/GEOMImpl/GEOMImpl_I3DPrimOperations.hxx
src/GEOMImpl/GEOMImpl_IBaseIEOperations.cxx
src/GEOMImpl/GEOMImpl_IBaseIEOperations.hxx
src/GEOMImpl/GEOMImpl_IBasicOperations.cxx
src/GEOMImpl/GEOMImpl_IBasicOperations.hxx
src/GEOMImpl/GEOMImpl_IBlocksOperations.cxx
src/GEOMImpl/GEOMImpl_IBlocksOperations.hxx
src/GEOMImpl/GEOMImpl_IBooleanOperations.cxx
src/GEOMImpl/GEOMImpl_IBooleanOperations.hxx
src/GEOMImpl/GEOMImpl_ICurvesOperations.cxx
src/GEOMImpl/GEOMImpl_ICurvesOperations.hxx
src/GEOMImpl/GEOMImpl_IECallBack.cxx
src/GEOMImpl/GEOMImpl_IECallBack.hxx
src/GEOMImpl/GEOMImpl_IFieldOperations.cxx
src/GEOMImpl/GEOMImpl_IFieldOperations.hxx
src/GEOMImpl/GEOMImpl_IGroupOperations.cxx
src/GEOMImpl/GEOMImpl_IGroupOperations.hxx
src/GEOMImpl/GEOMImpl_IHealingOperations.cxx
src/GEOMImpl/GEOMImpl_IHealingOperations.hxx
src/GEOMImpl/GEOMImpl_IInsertOperations.cxx
src/GEOMImpl/GEOMImpl_IInsertOperations.hxx
src/GEOMImpl/GEOMImpl_ILocalOperations.cxx
src/GEOMImpl/GEOMImpl_ILocalOperations.hxx
src/GEOMImpl/GEOMImpl_IMeasureOperations.cxx
src/GEOMImpl/GEOMImpl_IMeasureOperations.hxx
src/GEOMImpl/GEOMImpl_IShapesOperations.cxx
src/GEOMImpl/GEOMImpl_IShapesOperations.hxx
src/GEOMImpl/GEOMImpl_ITransformOperations.cxx
src/GEOMImpl/GEOMImpl_ITransformOperations.hxx
src/GEOMImpl/GEOMImpl_ImportDriver.cxx
src/GEOMToolsGUI/GEOMToolsGUI.cxx
src/GEOMToolsGUI/GEOMToolsGUI_1.cxx
src/GEOMToolsGUI/GEOMToolsGUI_MarkerDlg.cxx
src/GEOMToolsGUI/GEOMToolsGUI_PublishDlg.cxx
src/GEOMToolsGUI/GEOMToolsGUI_ReduceStudyDlg.cxx
src/GEOM_I/GEOM_DumpPython.cc
src/GEOM_I/GEOM_Field_i.cc
src/GEOM_I/GEOM_Gen_i.cc
src/GEOM_I/GEOM_IOperations_i.cc
src/GEOM_I/GEOM_Object_i.cc
src/GEOM_SWIG/geomBuilder.py
src/GEOM_SWIG_WITHIHM/libGEOM_Swig.cxx
src/GenerationGUI/GenerationGUI_PipeDlg.cxx
src/GenerationGUI/GenerationGUI_PipeDlg.h
src/IGESPlugin/IGESPlugin_GUI.cxx
src/IGESPlugin/IGESPlugin_IECallBack.cxx
src/IGESPlugin/IGESPlugin_IECallBack.hxx
src/IGESPlugin/IGESPlugin_IOperations.cxx
src/IGESPlugin/IGESPlugin_IOperations.hxx
src/IGESPlugin/IGESPlugin_OperationsCreator.cxx
src/IGESPlugin/IGESPlugin_OperationsCreator.hxx
src/MeasureGUI/MeasureGUI.cxx
src/MeasureGUI/MeasureGUI_Skeleton.cxx
src/OperationGUI/OperationGUI_PartitionDlg.cxx
src/OperationGUI/OperationGUI_PartitionDlg.h
src/RepairGUI/RepairGUI_FreeFacesDlg.cxx
src/RepairGUI/RepairGUI_GlueDlg.cxx
src/RepairGUI/RepairGUI_GlueDlg.h
src/RepairGUI/RepairGUI_LimitToleranceDlg.cxx
src/RepairGUI/RepairGUI_LimitToleranceDlg.h
src/RepairGUI/RepairGUI_RemoveExtraEdgesDlg.cxx
src/RepairGUI/RepairGUI_RemoveExtraEdgesDlg.h
src/RepairGUI/RepairGUI_RemoveWebsDlg.cxx
src/RepairGUI/RepairGUI_RemoveWebsDlg.h
src/RepairGUI/RepairGUI_SuppressFacesDlg.cxx
src/RepairGUI/RepairGUI_SuppressFacesDlg.h
src/RepairGUI/RepairGUI_UnionFacesDlg.cxx
src/RepairGUI/RepairGUI_UnionFacesDlg.h
src/STEPPlugin/STEPPlugin_GUI.cxx
src/STEPPlugin/STEPPlugin_IECallBack.cxx
src/STEPPlugin/STEPPlugin_IECallBack.hxx
src/STEPPlugin/STEPPlugin_IOperations.cxx
src/STEPPlugin/STEPPlugin_IOperations.hxx
src/STEPPlugin/STEPPlugin_OperationsCreator.cxx
src/STEPPlugin/STEPPlugin_OperationsCreator.hxx
src/STLPlugin/STLPlugin_GUI.cxx
src/STLPlugin/STLPlugin_IECallBack.cxx
src/STLPlugin/STLPlugin_IECallBack.hxx
src/STLPlugin/STLPlugin_IOperations.cxx
src/STLPlugin/STLPlugin_IOperations.hxx
src/STLPlugin/STLPlugin_OperationsCreator.cxx
src/STLPlugin/STLPlugin_OperationsCreator.hxx
src/TransformationGUI/TransformationGUI.cxx
src/TransformationGUI/TransformationGUI_MirrorDlg.cxx
src/TransformationGUI/TransformationGUI_MirrorDlg.h
src/TransformationGUI/TransformationGUI_MultiRotationDlg.cxx
src/TransformationGUI/TransformationGUI_MultiRotationDlg.h
src/TransformationGUI/TransformationGUI_MultiTranslationDlg.cxx
src/TransformationGUI/TransformationGUI_MultiTranslationDlg.h
src/TransformationGUI/TransformationGUI_OffsetDlg.cxx
src/TransformationGUI/TransformationGUI_OffsetDlg.h
src/TransformationGUI/TransformationGUI_PositionDlg.cxx
src/TransformationGUI/TransformationGUI_PositionDlg.h
src/TransformationGUI/TransformationGUI_RotationDlg.cxx
src/TransformationGUI/TransformationGUI_RotationDlg.h
src/TransformationGUI/TransformationGUI_ScaleDlg.cxx
src/TransformationGUI/TransformationGUI_ScaleDlg.h
src/TransformationGUI/TransformationGUI_TranslationDlg.cxx
src/TransformationGUI/TransformationGUI_TranslationDlg.h
src/VTKPlugin/VTKPlugin_GUI.cxx
src/VTKPlugin/VTKPlugin_IECallBack.cxx
src/VTKPlugin/VTKPlugin_IECallBack.hxx
src/VTKPlugin/VTKPlugin_IOperations.cxx
src/VTKPlugin/VTKPlugin_IOperations.hxx
src/VTKPlugin/VTKPlugin_OperationsCreator.cxx
src/VTKPlugin/VTKPlugin_OperationsCreator.hxx
src/XAOPlugin/XAOPlugin_IECallBack.cxx
src/XAOPlugin/XAOPlugin_IECallBack.hxx
src/XAOPlugin/XAOPlugin_IOperations.cxx
src/XAOPlugin/XAOPlugin_IOperations.hxx
src/XAOPlugin/XAOPlugin_OperationsCreator.cxx
src/XAOPlugin/XAOPlugin_OperationsCreator.hxx

index e45d62e9e741717d567631cdc22018e8cedd6871..dc67e147891dec59baa56de0bb36d31f97c8b6cb 100644 (file)
             <service-comment>unknown</service-comment>
             <service-by-default>0</service-by-default>
             <inParameter-list>
-              <inParameter>
-                <inParameter-name>theStudy</inParameter-name>
-                <inParameter-type>Study</inParameter-type>
-                <inParameter-comment>unknown</inParameter-comment>
-              </inParameter>
               <inParameter>
                 <inParameter-name>theObject</inParameter-name>
                 <inParameter-type>GEOM/GEOM_BaseObject</inParameter-type>
             <service-comment>unknown</service-comment>
             <service-by-default>0</service-by-default>
             <inParameter-list>
-              <inParameter>
-                <inParameter-name>theStudy</inParameter-name>
-                <inParameter-type>Study</inParameter-type>
-                <inParameter-comment>unknown</inParameter-comment>
-              </inParameter>
               <inParameter>
                 <inParameter-name>theObject</inParameter-name>
                 <inParameter-type>GEOM/GEOM_Object</inParameter-type>
             <service-comment>unknown</service-comment>
             <service-by-default>0</service-by-default>
             <inParameter-list>
-              <inParameter>
-                <inParameter-name>theStudy</inParameter-name>
-                <inParameter-type>Study</inParameter-type>
-                <inParameter-comment>unknown</inParameter-comment>
-              </inParameter>
               <inParameter>
                 <inParameter-name>theObject</inParameter-name>
                 <inParameter-type>GEOM/GEOM_Object</inParameter-type>
             <service-comment>unknown</service-comment>
             <service-by-default>0</service-by-default>
             <inParameter-list>
-              <inParameter>
-                <inParameter-name>theStudy</inParameter-name>
-                <inParameter-type>Study</inParameter-type>
-                <inParameter-comment>unknown</inParameter-comment>
-              </inParameter>
               <inParameter>
                 <inParameter-name>theSObject</inParameter-name>
                 <inParameter-type>SObject</inParameter-type>
             <service-version>@SALOMEGEOM_VERSION@</service-version>
             <service-comment>unknown</service-comment>
             <service-by-default>0</service-by-default>
-            <inParameter-list>
-              <inParameter>
-                <inParameter-name>theStudyEntry</inParameter-name>
-                <inParameter-type>string</inParameter-type>
-                <inParameter-comment>unknown</inParameter-comment>
-              </inParameter>
-            </inParameter-list>
+            <inParameter-list></inParameter-list>
             <outParameter-list>
               <outParameter>
                 <outParameter-name>return</outParameter-name>
             <service-comment>unknown</service-comment>
             <service-by-default>0</service-by-default>
             <inParameter-list>
-              <inParameter>
-                <inParameter-name>theStudy</inParameter-name>
-                <inParameter-type>Study</inParameter-type>
-                <inParameter-comment>unknown</inParameter-comment>
-              </inParameter>
               <inParameter>
                 <inParameter-name>theObject</inParameter-name>
                 <inParameter-type>CORBA/Object</inParameter-type>
index 88bd4a37f2b3e237b35b7b2d360028ddd074fc45..2ae8db0baa2b0d5acdc52e74e215078b8fbbefe1 100644 (file)
  *  Constructor
  */
 //=============================================================================
-AdvancedEngine_IOperations::AdvancedEngine_IOperations(GEOM_Engine* theEngine, int theDocID) :
-  GEOM_IOperations(theEngine, theDocID)
+AdvancedEngine_IOperations::AdvancedEngine_IOperations(GEOM_Engine* theEngine) :
+  GEOM_IOperations(theEngine)
 {
   MESSAGE("AdvancedEngine_IOperations::AdvancedEngine_IOperations");
-  myBasicOperations     = new GEOMImpl_IBasicOperations(GetEngine(), GetDocID());
-  myBooleanOperations   = new GEOMImpl_IBooleanOperations(GetEngine(), GetDocID());
-  myShapesOperations    = new GEOMImpl_IShapesOperations(GetEngine(), GetDocID());
-  myTransformOperations = new GEOMImpl_ITransformOperations(GetEngine(), GetDocID());
-  myBlocksOperations    = new GEOMImpl_IBlocksOperations(GetEngine(), GetDocID());
-  my3DPrimOperations    = new GEOMImpl_I3DPrimOperations(GetEngine(), GetDocID());
-  myLocalOperations     = new GEOMImpl_ILocalOperations(GetEngine(), GetDocID());
-  myHealingOperations   = new GEOMImpl_IHealingOperations(GetEngine(), GetDocID());
-  myGroupOperations     = new GEOMImpl_IGroupOperations(GetEngine(), GetDocID());
+  myBasicOperations     = new GEOMImpl_IBasicOperations(GetEngine());
+  myBooleanOperations   = new GEOMImpl_IBooleanOperations(GetEngine());
+  myShapesOperations    = new GEOMImpl_IShapesOperations(GetEngine());
+  myTransformOperations = new GEOMImpl_ITransformOperations(GetEngine());
+  myBlocksOperations    = new GEOMImpl_IBlocksOperations(GetEngine());
+  my3DPrimOperations    = new GEOMImpl_I3DPrimOperations(GetEngine());
+  myLocalOperations     = new GEOMImpl_ILocalOperations(GetEngine());
+  myHealingOperations   = new GEOMImpl_IHealingOperations(GetEngine());
+  myGroupOperations     = new GEOMImpl_IGroupOperations(GetEngine());
 }
 
 //=============================================================================
@@ -1076,7 +1076,7 @@ bool AdvancedEngine_IOperations::MakeInternalGroup
   // Get faces that are laying on conical faces.
   if (aConicalFaces.IsEmpty() == Standard_False) {
     Handle(GEOM_Object) aCone =
-      GetEngine()->AddObject(GetDocID(), GEOM_TSHAPE);
+      GetEngine()->AddObject(GEOM_TSHAPE);
     Handle(GEOM_Function) aFunction =
       aCone->AddFunction(AdvancedEngine_PipeTShapeDriver::GetID(), TSHAPE_BASIC);
     TopTools_ListIteratorOfListOfShape aFIter(aConicalFaces);
@@ -1915,7 +1915,7 @@ Handle(TColStd_HSequenceOfTransient)
   MESSAGE("AdvancedEngine_IOperations::MakePipeTShape");
   SetErrorCode(KO);
   //Add a new object
-  Handle(GEOM_Object) aShape = GetEngine()->AddObject(GetDocID(), GEOM_TSHAPE);
+  Handle(GEOM_Object) aShape = GetEngine()->AddObject(GEOM_TSHAPE);
 
   //Add a new shape function with parameters
   Handle(GEOM_Function) aFunction = aShape->AddFunction(AdvancedEngine_PipeTShapeDriver::GetID(), TSHAPE_BASIC);
@@ -2070,7 +2070,7 @@ AdvancedEngine_IOperations::MakePipeTShapeWithPosition
 {
   SetErrorCode(KO);
   //Add a new object
-  Handle(GEOM_Object) aShape = GetEngine()->AddObject(GetDocID(), GEOM_TSHAPE);
+  Handle(GEOM_Object) aShape = GetEngine()->AddObject(GEOM_TSHAPE);
   /////////////////
   // TSHAPE CODE
   /////////////////
@@ -2238,7 +2238,7 @@ AdvancedEngine_IOperations::MakePipeTShapeChamfer
 {
   SetErrorCode(KO);
   //Add a new object
-  Handle(GEOM_Object) aShape = GetEngine()->AddObject(GetDocID(), GEOM_TSHAPE);
+  Handle(GEOM_Object) aShape = GetEngine()->AddObject(GEOM_TSHAPE);
   //Add a new shape function with parameters
   Handle(GEOM_Function) aFunction = aShape->AddFunction(AdvancedEngine_PipeTShapeDriver::GetID(), TSHAPE_CHAMFER);
   if (aFunction.IsNull()) return NULL;
@@ -2468,7 +2468,7 @@ AdvancedEngine_IOperations::MakePipeTShapeChamferWithPosition
 {
   SetErrorCode(KO);
   //Add a new object
-  Handle(GEOM_Object) aShape = GetEngine()->AddObject(GetDocID(), GEOM_TSHAPE);
+  Handle(GEOM_Object) aShape = GetEngine()->AddObject(GEOM_TSHAPE);
   //Add a new shape function with parameters
   Handle(GEOM_Function) aFunction = aShape->AddFunction(AdvancedEngine_PipeTShapeDriver::GetID(), TSHAPE_CHAMFER);
   if (aFunction.IsNull()) return NULL;
@@ -2699,7 +2699,7 @@ AdvancedEngine_IOperations::MakePipeTShapeFillet
 {
   SetErrorCode(KO);
   //Add a new object
-  Handle(GEOM_Object) aShape = GetEngine()->AddObject(GetDocID(), GEOM_TSHAPE);
+  Handle(GEOM_Object) aShape = GetEngine()->AddObject(GEOM_TSHAPE);
   //Add a new shape function with parameters
   Handle(GEOM_Function) aFunction = aShape->AddFunction(AdvancedEngine_PipeTShapeDriver::GetID(), TSHAPE_FILLET);
   if (aFunction.IsNull()) return NULL;
@@ -2951,7 +2951,7 @@ AdvancedEngine_IOperations::MakePipeTShapeFilletWithPosition
 {
   SetErrorCode(KO);
   //Add a new object
-  Handle(GEOM_Object) aShape = GetEngine()->AddObject(GetDocID(), GEOM_TSHAPE);
+  Handle(GEOM_Object) aShape = GetEngine()->AddObject(GEOM_TSHAPE);
   //Add a new shape function with parameters
   Handle(GEOM_Function) aFunction = aShape->AddFunction(AdvancedEngine_PipeTShapeDriver::GetID(), TSHAPE_FILLET);
   if (aFunction.IsNull()) return NULL;
@@ -3202,7 +3202,7 @@ Handle(GEOM_Object) AdvancedEngine_IOperations::MakeDividedDisk (double theR, do
     return NULL;
   }
   //Add a new object
-  Handle(GEOM_Object) aShape = GetEngine()->AddObject(GetDocID(), GEOM_DIVIDEDDISK);
+  Handle(GEOM_Object) aShape = GetEngine()->AddObject(GEOM_DIVIDEDDISK);
 
   //Add a new shape function with parameters
   Handle(GEOM_Function) aFunction = aShape->AddFunction(AdvancedEngine_DividedDiskDriver::GetID(), DIVIDEDDISK_R_RATIO);
@@ -3270,7 +3270,7 @@ Handle(GEOM_Object) AdvancedEngine_IOperations::MakeDividedDiskPntVecR (Handle(G
   SetErrorCode(KO);
 
   //Add a new object
-  Handle(GEOM_Object) aShape = GetEngine()->AddObject(GetDocID(), GEOM_DIVIDEDDISK);
+  Handle(GEOM_Object) aShape = GetEngine()->AddObject(GEOM_DIVIDEDDISK);
 
   //Add a new shape function with parameters
   Handle(GEOM_Function) aFunction = aShape->AddFunction(AdvancedEngine_DividedDiskDriver::GetID(), DIVIDEDDISK_R_VECTOR_PNT);
@@ -3343,7 +3343,7 @@ Handle(GEOM_Object) AdvancedEngine_IOperations::MakeDividedCylinder (double theR
   SetErrorCode(KO);
   
   //Add a new object
-  Handle(GEOM_Object) aShape = GetEngine()->AddObject(GetDocID(), GEOM_DIVIDEDCYLINDER);
+  Handle(GEOM_Object) aShape = GetEngine()->AddObject(GEOM_DIVIDEDCYLINDER);
 
   Handle(GEOM_Object) aBaseShape = MakeDividedDisk(theR, 67.0, 1, thePattern);
   aBaseShape->GetLastFunction()->SetDescription("");   // Erase dump of MakeDividedDisk
@@ -3391,7 +3391,7 @@ Handle(GEOM_Object) AdvancedEngine_IOperations::MakeSmoothingSurface (std::list<
   SetErrorCode(KO);
 
   //Add a new object
-  Handle(GEOM_Object) aShape = GetEngine()->AddObject(GetDocID(), GEOM_SMOOTHINGSURFACE);
+  Handle(GEOM_Object) aShape = GetEngine()->AddObject(GEOM_SMOOTHINGSURFACE);
 
   //Add a new shape function with parameters
   Handle(GEOM_Function) aFunction = aShape->AddFunction(AdvancedEngine_SmoothingSurfaceDriver::GetID(), SMOOTHINGSURFACE_LPOINTS);
index 8a28dded39f65272c8e8dabec5e26c415e3fa2e6..58c3a269e0215862b0e40d7ecec4a64b0a567b92 100644 (file)
@@ -165,7 +165,7 @@ public:
                                              bool fuse);
   
 public:
-  AdvancedEngine_IOperations(GEOM_Engine* theEngine, int theDocID);
+  AdvancedEngine_IOperations(GEOM_Engine* theEngine);
   ~AdvancedEngine_IOperations();
 
   Handle(TColStd_HSequenceOfTransient) 
index f1c5e1a39c4979118371810bb5c3be594b3afb9f..40c79e2101906a97fe4dc6a1b36a94b8e54f0313 100644 (file)
@@ -56,11 +56,12 @@ GEOM_IOperations_i* AdvancedEngine_OperationsCreator::Create (PortableServer::PO
 {
   Unexpect aCatch(SALOME_SalomeException);
   MESSAGE( "AdvancedEngine_OperationsCreator::Create" );
-  _operation = new AdvancedEngine_IOperations( theGenImpl );
-  return new AdvancedEngine_IOperations_i( thePOA, theEngine, _operation );
+  return new AdvancedEngine_IOperations_i( thePOA, theEngine, get( theGenImpl ) );
 }
 
-AdvancedEngine_IOperations* AdvancedEngine_OperationsCreator::get()
+AdvancedEngine_IOperations* AdvancedEngine_OperationsCreator::get( ::GEOMImpl_Gen* theGenImpl )
 {
+  if( !_operation )
+    _operation = new AdvancedEngine_IOperations( theGenImpl );
   return _operation;
 }
index 5971fb086bc2dc2cf56e72e50e86f58a0fa94996..b1b3b3c047c773f8bcab90288513f4dabd87738b 100755 (executable)
@@ -45,9 +45,9 @@ public:
                                          ::GEOMImpl_Gen*         theGenImpl);
 
 private:
-  static AdvancedEngine_IOperations* get();
+  static AdvancedEngine_IOperations* get(::GEOMImpl_Gen* theGenImpl);
 private:
-  static AdvancedEngine_IOperations*_operation;
+  static AdvancedEngine_IOperations* _operation;
 };
 
 #endif
index 4008b57369529acfa3693fefe2ad201da9a26e3b..5216a5b1fb2865ddfda5fbac2f1b0584d90eb2f1 100644 (file)
@@ -1217,8 +1217,7 @@ bool AdvancedGUI_PipeTShapeDlg::executeNoCheck (ObjectList& objects)
 // function : restoreSubShapes
 // purpose  :
 //=================================================================================
-void AdvancedGUI_PipeTShapeDlg::restoreSubShapes (SALOMEDS::Study_ptr theStudy,
-                                                  SALOMEDS::SObject_ptr theSObject)
+void AdvancedGUI_PipeTShapeDlg::restoreSubShapes (SALOMEDS::SObject_ptr theSObject)
 {
   SALOMEDS::GenericAttribute_var anAttr;
   if (!theSObject->FindAttribute(anAttr, "AttributeIOR"))
@@ -1236,7 +1235,7 @@ void AdvancedGUI_PipeTShapeDlg::restoreSubShapes (SALOMEDS::Study_ptr theStudy,
   ObjectList::iterator it = pipeTShapeGroupObjects.begin();
 
   for (int i = 0; it != pipeTShapeGroupObjects.end(); it++, i++) {
-    getGeomEngine()->AddInStudy(theStudy, (*it), tr((*it)->GetName()).toStdString().c_str(), theFather);
+    getGeomEngine()->AddInStudy((*it), tr((*it)->GetName()).toStdString().c_str(), theFather);
   }
 }
 
index ad188a489464b9a25dd596a546822b575a4e1924..7518c36fded4b177fbd26ed03edd9f97120ca94c 100644 (file)
@@ -78,7 +78,7 @@ protected:
   virtual GEOM::GEOM_IOperations_ptr createOperation();
   virtual bool isValid (QString&);
   virtual bool execute (ObjectList&);
-  virtual void restoreSubShapes (SALOMEDS::Study_ptr, SALOMEDS::SObject_ptr);
+  virtual void restoreSubShapes (SALOMEDS::SObject_ptr);
   virtual QList<GEOM::GeomObjPtr> getSourceObjects();
 
 private:
index f47b3bd7c4c63df79b1d055bf67f7db45fddd94c..3d28b8177fe2c7f71f2318a18b5a6d53c7b48472 100644 (file)
@@ -143,7 +143,7 @@ bool BREPPlugin_GUI::importBREP( SUIT_Desktop* parent )
          
           entryList.append( so->GetID() );
           transaction.commit();
-          GEOM_Displayer( study ).Display( main.in() );
+          GEOM_Displayer().Display( main.in() );
           main->UnRegister();
         }
         else
index dd8c271972e4a62b2cb12d2f03ef74c58c146b9d..0d5461955d637ca8ebddcc61aee5a6f2d9bc310a 100755 (executable)
@@ -46,12 +46,11 @@ BREPPlugin_IECallBack::~BREPPlugin_IECallBack()
  */
 //=============================================================================
 bool 
-BREPPlugin_IECallBack::Export( int                            theDocId,
-                              const Handle(GEOM_Object)      theOriginal,
-                              const TCollection_AsciiString& theFileName,
-                              const TCollection_AsciiString& theFormatName )
+BREPPlugin_IECallBack::Export( const Handle(GEOM_Object)      theOriginal,
+                                          const TCollection_AsciiString& theFileName,
+                                          const TCollection_AsciiString& theFormatName )
 {
-  BREPPlugin_IOperations* aPluginOperations = BREPPlugin_OperationsCreator::get( GetEngine(), theDocId );
+  BREPPlugin_IOperations* aPluginOperations = BREPPlugin_OperationsCreator::get( GetEngine() );
   aPluginOperations->ExportBREP( theOriginal, theFileName );
   return true;
 }
@@ -62,11 +61,10 @@ BREPPlugin_IECallBack::Export( int                            theDocId,
  */
 //=============================================================================
 Handle(TColStd_HSequenceOfTransient)
-BREPPlugin_IECallBack::Import( int                            theDocId,
-                              const TCollection_AsciiString& theFormatName,
-                              const TCollection_AsciiString& theFileName )
+BREPPlugin_IECallBack::Import( const TCollection_AsciiString& theFormatName,
+                                          const TCollection_AsciiString& theFileName )
 {
-  BREPPlugin_IOperations* aPluginOperations = BREPPlugin_OperationsCreator::get( GetEngine(), theDocId );
+  BREPPlugin_IOperations* aPluginOperations = BREPPlugin_OperationsCreator::get( GetEngine() );
   return aPluginOperations->ImportBREP( theFileName );
 }
 
index a718d0f8b9faf677ecfa75f98ac20ada742a7c5a..9d59d79bc060a8fa068a850818431595d93e65d7 100644 (file)
@@ -36,14 +36,12 @@ public:
   BREPPlugin_IECallBack();
   ~BREPPlugin_IECallBack();
   
-  bool Export( int                            theDocId,
-              const Handle(GEOM_Object)      theOriginal,
-              const TCollection_AsciiString& theFileName,
-              const TCollection_AsciiString& theFormatName );
+  bool Export( const Handle(GEOM_Object)      theOriginal,
+                  const TCollection_AsciiString& theFileName,
+                  const TCollection_AsciiString& theFormatName );
 
-  Handle(TColStd_HSequenceOfTransient) Import( int                            theDocId,
-                                              const TCollection_AsciiString& theFormatName,
-                                              const TCollection_AsciiString& theFileName );
+  Handle(TColStd_HSequenceOfTransient) Import( const TCollection_AsciiString& theFormatName,
+                                                                  const TCollection_AsciiString& theFileName );
 };
 
 #endif
index 43f72dac53ac0e324bfb54d68652345168def92c..3ed5736f6650e923df699043bb01e5743a61ae6d 100644 (file)
@@ -38,8 +38,8 @@
  *  Constructor
  */
 //=============================================================================
-BREPPlugin_IOperations::BREPPlugin_IOperations( GEOM_Engine* theEngine, int theDocID )
-: GEOMImpl_IBaseIEOperations( theEngine, theDocID )
+BREPPlugin_IOperations::BREPPlugin_IOperations( GEOM_Engine* theEngine )
+: GEOMImpl_IBaseIEOperations( theEngine )
 {
   MESSAGE( "BREPPlugin_IOperations::BREPPlugin_IOperations" );
 }
@@ -74,7 +74,7 @@ void BREPPlugin_IOperations::ExportBREP( const Handle(GEOM_Object)      theOrigi
   if( aRefFunction.IsNull() ) return;  //There is no function which creates an object to be exported
 
   //Add a new result object
-  Handle(GEOM_Object) result = GetEngine()->AddObject( GetDocID(), GEOM_IMPORT);
+  Handle(GEOM_Object) result = GetEngine()->AddObject( GEOM_IMPORT);
 
   //Add an Export function
   Handle(GEOM_Function) aFunction = result->AddFunction( BREPPlugin_ExportDriver::GetID(), EXPORT_SHAPE );
@@ -124,7 +124,7 @@ BREPPlugin_IOperations::ImportBREP( const TCollection_AsciiString& theFileName )
   if( theFileName.IsEmpty() ) return NULL;
 
   //Add a new result object
-  Handle(GEOM_Object) anImported = GetEngine()->AddObject( GetDocID(), GEOM_IMPORT );
+  Handle(GEOM_Object) anImported = GetEngine()->AddObject( GEOM_IMPORT );
 
   //Add an Import function
   Handle(GEOM_Function) aFunction =
index d2eaebd503c561b57fdad39a7ef460a170d53b0f..831b1c792305442ac1def9c87f66448d986f217d 100644 (file)
@@ -30,7 +30,7 @@
 class BREPPLUGINENGINE_EXPORT BREPPlugin_IOperations: public GEOMImpl_IBaseIEOperations
 {
 public:
-  BREPPlugin_IOperations( GEOM_Engine*, int );
+  BREPPlugin_IOperations( GEOM_Engine* );
   ~BREPPlugin_IOperations();
 
   void ExportBREP( const Handle(GEOM_Object),
index 84c05014c77d2f54917c437a0eb92853d2881529..f1b96159bdb0e4dc63a5f2e4b94445e43b8fea34 100644 (file)
@@ -56,11 +56,12 @@ GEOM_IOperations_i* BREPPlugin_OperationsCreator::Create( PortableServer::POA_pt
 {
   Unexpect aCatch( SALOME_SalomeException );
   MESSAGE( "BREPPlugin_OperationsCreator::Create" );
-  _operation = new BREPPlugin_IOperations( theGenImpl );
-  return new BREPPlugin_IOperations_i( thePOA, theEngine, _operation );
+  return new BREPPlugin_IOperations_i( thePOA, theEngine, get( theGenImpl ) );
 }
 
-BREPPlugin_IOperations* BREPPlugin_OperationsCreator::get()
+BREPPlugin_IOperations* BREPPlugin_OperationsCreator::get( ::GEOMImpl_Gen* theGenImpl )
 {
+  if( !_operation )
+    _operation = new BREPPlugin_IOperations( theGenImpl );
   return _operation;
 }
index c0997b5168573baa79ef9fc64b2b62660e8c4fae..e49c6cb533b769b914a7815c0aaef0e0f9aaf0d2 100755 (executable)
@@ -44,10 +44,10 @@ public:
                                          GEOM::GEOM_Gen_ptr      theEngine,
                                          ::GEOMImpl_Gen*         theGenImpl );
 private:
-  static BREPPlugin_IOperations* get();
+  static BREPPlugin_IOperations* get(::GEOMImpl_Gen* theGenImpl);
 
 private:
-  static BREPPlugin_IOperations*  _operation;
+  static BREPPlugin_IOperations* _operation;
 
   friend class BREPPlugin_IECallBack;
 };
index e148cc3aa82d69b52bd9da74db34717245410927..c2d1d97da8433872da5c1a1dab68e1ee058a0ce6 100644 (file)
@@ -457,12 +457,11 @@ bool BooleanGUI_Dialog::execute (ObjectList& objects)
 // function : restoreSubShapes
 // purpose  :
 //=================================================================================
-void BooleanGUI_Dialog::restoreSubShapes (SALOMEDS::Study_ptr   theStudy,
-                                          SALOMEDS::SObject_ptr theSObject)
+void BooleanGUI_Dialog::restoreSubShapes (SALOMEDS::SObject_ptr theSObject)
 {
   if (mainFrame()->CheckBoxRestoreSS->isChecked()) {
     // empty list of arguments means that all arguments should be restored
-    getGeomEngine()->RestoreSubShapesSO(theStudy, theSObject, GEOM::ListOfGO(),
+    getGeomEngine()->RestoreSubShapesSO( theSObject, GEOM::ListOfGO(),
                                          /*theFindMethod=*/GEOM::FSM_GetInPlace, // ? GEOM::FSM_GetSame
                                          /*theInheritFirstArg=*/myOperation == BooleanGUI::CUT,
                                          mainFrame()->CheckBoxAddPrefix->isChecked()); // ? false
index e2f535595fbd64ed1a68b57341272d8e191777e4..a009ddecb8d643591f8f1572b11b9a158031fda7 100644 (file)
@@ -50,7 +50,7 @@ protected:
   virtual GEOM::GEOM_IOperations_ptr createOperation();
   virtual bool                       isValid( QString& );
   virtual bool                       execute( ObjectList& );
-  virtual void                       restoreSubShapes( SALOMEDS::Study_ptr, SALOMEDS::SObject_ptr );
+  virtual void                       restoreSubShapes( SALOMEDS::SObject_ptr );
   virtual void                       addSubshapesToStudy();
   virtual QList<GEOM::GeomObjPtr>    getSourceObjects();
 
index 7cf57c914062b6e2d0c7a1335ca9cf8cc9842685..f64a92bf7f70802cc3d636389fd063525a922e50 100644 (file)
@@ -244,12 +244,11 @@ bool BuildGUI_CompoundDlg::execute( ObjectList& objects )
 // function : restoreSubShapes
 // purpose  :
 //=================================================================================
-void BuildGUI_CompoundDlg::restoreSubShapes( SALOMEDS::Study_ptr   theStudy,
-                                             SALOMEDS::SObject_ptr theSObject )
+void BuildGUI_CompoundDlg::restoreSubShapes( SALOMEDS::SObject_ptr theSObject )
 {
   if ( mainFrame()->CheckBoxRestoreSS->isChecked() ) {
     // empty list of arguments means that all arguments should be restored
-    getGeomEngine()->RestoreSubShapesSO( theStudy, theSObject, GEOM::ListOfGO(),
+    getGeomEngine()->RestoreSubShapesSO( theSObject, GEOM::ListOfGO(),
                                          /*theFindMethod=*/GEOM::FSM_GetInPlace, // ? GEOM::FSM_GetSame
                                          /*theInheritFirstArg=*/false,
                                          mainFrame()->CheckBoxAddPrefix->isChecked() );
index 280737050c31d43d84b186b6e6148a775395e539..75737c1ad12b2a7f2b8ad3e1c5ef13496876a27f 100644 (file)
@@ -49,7 +49,7 @@ protected:
   virtual GEOM::GEOM_IOperations_ptr createOperation();
   virtual bool                       isValid( QString& );
   virtual bool                       execute( ObjectList& );
-  virtual void                       restoreSubShapes( SALOMEDS::Study_ptr, SALOMEDS::SObject_ptr );
+  virtual void                       restoreSubShapes( SALOMEDS::SObject_ptr );
   virtual QList<GEOM::GeomObjPtr>    getSourceObjects();
 
 private:
index 1b3d58c3f86cd0d69a0196b58459d9d8e2c36ded..aae7fe5fb72512ef92913a6d4360d0b8c284d540 100644 (file)
@@ -66,8 +66,7 @@ void DependencyTree_ViewModel::onShowSelected()
   SALOME_ListIO aSelList;
   aSelMgr->selectedObjects(aSelList);
 
-  SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
-  GEOM_Displayer disp( appStudy );
+  GEOM_Displayer disp;
 
   OCCViewer_ViewManager* anOCCVM = ( OCCViewer_ViewManager* ) app->getViewManager( OCCViewer_Viewer::Type(), /*create=*/ true );
 
@@ -96,8 +95,7 @@ void DependencyTree_ViewModel::onShowOnlySelected()
   SALOME_ListIO aSelList;
   aSelMgr->selectedObjects( aSelList );
 
-  SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
-  GEOM_Displayer disp( appStudy );
+  GEOM_Displayer disp;
 
   OCCViewer_ViewManager* anOCCVM = (OCCViewer_ViewManager*) app->getViewManager( OCCViewer_Viewer::Type(), /*create=*/ true );
 
index f1c83f1fb7f30078e914a2de6484b172605f01c8..0552e358882d61682b8cfa23a4e2bec30433b5fb 100644 (file)
@@ -87,9 +87,6 @@ bool DisplayGUI::OnGUIEvent(int theCommandID, SUIT_Desktop* parent)
   SalomeApp_Application* app = getGeometryGUI()->getApp();
   if (!app) return false;
 
-  SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
-  if ( !appStudy ) return false;
-
   LightApp_SelectionMgr *Sel = app->selectionMgr();
   SALOME_ListIO selected;
   Sel->selectedObjects( selected );
@@ -173,7 +170,7 @@ bool DisplayGUI::OnGUIEvent(int theCommandID, SUIT_Desktop* parent)
     break;
   }
   Sel->setSelectedObjects( selected );
-  GEOM_Displayer( appStudy ).UpdateColorScale();
+  GEOM_Displayer().UpdateColorScale();
   return true;
 }
 
@@ -210,7 +207,7 @@ void DisplayGUI::DisplayAll()
     } 
     anIter->Next();
   }
-  GEOM_Displayer( appStudy ).Display( listIO, true );
+  GEOM_Displayer().Display( listIO, true );
 }
 
 //=====================================================================================
@@ -225,11 +222,10 @@ void DisplayGUI::EraseAll()
   if ( app ) {
     SUIT_ViewWindow* vw = app->desktop()->activeWindow();
     if ( vw ) {
-      SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
       SUIT_ViewManager* vman = vw->getViewManager();
       if ( vman->getType() == OCCViewer_Viewer::Type() || 
            vman->getType() == SVTK_Viewer::Type() ) {
-        GEOM_Displayer( appStudy ).EraseAll(true);
+        GEOM_Displayer().EraseAll(true);
       }
     }
   }
@@ -258,8 +254,8 @@ void DisplayGUI::DisplayOnlyChildren()
   SalomeApp_Application* app = getGeometryGUI()->getApp();
   if (!app) return;
 
-  SalomeApp_Study* anActiveStudy = dynamic_cast<SalomeApp_Study*>(app->activeStudy());
-  if (!anActiveStudy) return;
+  SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>(app->activeStudy());
+  if (!aStudy) return;
 
   LightApp_SelectionMgr* aSelMgr = app->selectionMgr();
   if (!aSelMgr) return;
@@ -275,14 +271,14 @@ void DisplayGUI::DisplayOnlyChildren()
   for (; It.More(); It.Next()) {
     Handle(SALOME_InteractiveObject) anIObject = It.Value();
     if (anIObject->hasEntry()) {
-      _PTR(SObject) SO (anActiveStudy->studyDS()->FindObjectID(anIObject->getEntry()));
+      _PTR(SObject) SO (aStudy->studyDS()->FindObjectID(anIObject->getEntry()));
       if (SO) {
         _PTR(SComponent) SC (SO->GetFatherComponent());
         if (QString(SO->GetID().c_str()) == QString(SO->GetFatherComponent()->GetID().c_str())) {
           // if component is selected, pass it
         }
         else {
-          _PTR(ChildIterator) anIter (anActiveStudy->studyDS()->NewChildIterator(SO));
+          _PTR(ChildIterator) anIter (aStudy->studyDS()->NewChildIterator(SO));
           anIter->InitEx(true);
           while (anIter->More()) {
             _PTR(SObject) valSO (anIter->Value());
@@ -298,7 +294,7 @@ void DisplayGUI::DisplayOnlyChildren()
       }
     }
   }
-  GEOM_Displayer(anActiveStudy).Display(listIO, true);
+  GEOM_Displayer().Display(listIO, true);
 }
 
 //=====================================================================================
@@ -312,8 +308,8 @@ void DisplayGUI::Display()
   SalomeApp_Application* app = getGeometryGUI()->getApp();
   if ( !app ) return;
 
-  SalomeApp_Study* anActiveStudy = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
-  if ( !anActiveStudy ) return;
+  SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
+  if ( !aStudy ) return;
 
   //get SalomeApp selection manager
   LightApp_SelectionMgr* aSelMgr = app->selectionMgr();
@@ -328,12 +324,12 @@ void DisplayGUI::Display()
   for( ;It.More();It.Next() ) {
     Handle(SALOME_InteractiveObject) anIObject = It.Value();
     if ( anIObject->hasEntry() ) {
-      _PTR(SObject) SO ( anActiveStudy->studyDS()->FindObjectID( anIObject->getEntry() ) );
+      _PTR(SObject) SO ( aStudy->studyDS()->FindObjectID( anIObject->getEntry() ) );
       if ( SO && QString(SO->GetID().c_str()) == QString(SO->GetFatherComponent()->GetID().c_str()) ) {
         _PTR(SComponent) SC ( SO->GetFatherComponent() );
         // if component is selected
         listIO.Clear();
-        _PTR(ChildIterator) anIter ( anActiveStudy->studyDS()->NewChildIterator( SO ) );
+        _PTR(ChildIterator) anIter ( aStudy->studyDS()->NewChildIterator( SO ) );
         anIter->InitEx( true );
         while( anIter->More() ) {
           _PTR(SObject) valSO ( anIter->Value() );
@@ -355,7 +351,7 @@ void DisplayGUI::Display()
       listIO.Append( anIObject );
     }
   }
-  GEOM_Displayer( anActiveStudy ).Display( listIO, true );
+  GEOM_Displayer().Display( listIO, true );
 }
 
 
@@ -370,8 +366,8 @@ void DisplayGUI::Erase()
   SalomeApp_Application* app = getGeometryGUI()->getApp();
   if ( !app ) return;
 
-  SalomeApp_Study* anActiveStudy = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
-  if ( !anActiveStudy ) return;
+  SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
+  if ( !aStudy ) return;
 
   //get SalomeApp selection manager
   LightApp_SelectionMgr* aSelMgr = app->selectionMgr();
@@ -386,12 +382,12 @@ void DisplayGUI::Erase()
   for( ; It.More(); It.Next() ) {
     Handle(SALOME_InteractiveObject) anIObject = It.Value();
     if ( anIObject->hasEntry() ) {
-      _PTR(SObject) SO ( anActiveStudy->studyDS()->FindObjectID( anIObject->getEntry() ) );
+      _PTR(SObject) SO ( aStudy->studyDS()->FindObjectID( anIObject->getEntry() ) );
       if ( SO && QString(SO->GetID().c_str()) == QString(SO->GetFatherComponent()->GetID().c_str()) ) {
         _PTR(SComponent) SC ( SO->GetFatherComponent() );
         // if component is selected
         listIO.Clear();
-        _PTR(ChildIterator) anIter ( anActiveStudy->studyDS()->NewChildIterator( SO ) );
+        _PTR(ChildIterator) anIter ( aStudy->studyDS()->NewChildIterator( SO ) );
         anIter->InitEx( true );
         while( anIter->More() ) {
           _PTR(SObject) valSO ( anIter->Value() );
@@ -419,7 +415,7 @@ void DisplayGUI::Erase()
   if(viewWindow->getViewManager()->getType() == SVTK_Viewer::Type())
     aIsForced = false;
 
-  GEOM_Displayer(anActiveStudy).Erase( listIO, aIsForced);
+  GEOM_Displayer().Erase( listIO, aIsForced);
   getGeometryGUI()->getApp()->selectionMgr()->clearSelected();
 }
 
@@ -440,7 +436,7 @@ void DisplayGUI::SetDisplayMode( const int mode, SUIT_ViewWindow* viewWindow )
   SalomeApp_Study* aStudy = dynamic_cast< SalomeApp_Study* >( app->activeStudy() );
   if ( !aStudy ) return;
 
-  GEOM_Displayer displayer( aStudy );
+  GEOM_Displayer displayer;
 
   int mgrId = viewWindow->getViewManager()->getGlobalId();
 
@@ -476,7 +472,7 @@ void DisplayGUI::SetVectorMode( const bool mode, SUIT_ViewWindow* viewWindow )
   if ( !viewWindow ) 
     viewWindow = app->desktop()->activeWindow();
 
-  GEOM_Displayer displayer( aStudy );
+  GEOM_Displayer displayer;
 
   viewWindow->setProperty( "VectorsMode", mode );
 
@@ -525,7 +521,7 @@ void DisplayGUI::SetVerticesMode( const bool mode, SUIT_ViewWindow* viewWindow )
   if ( !viewWindow ) 
     viewWindow = app->desktop()->activeWindow();
 
-  GEOM_Displayer displayer( aStudy );
+  GEOM_Displayer displayer;
 
   viewWindow->setProperty( "VerticesMode", mode );
 
@@ -576,7 +572,7 @@ void DisplayGUI::SetNameMode( const bool mode, SUIT_ViewWindow* viewWindow )
 
   viewWindow->setProperty( "NameMode", mode );
 
-  GEOM_Displayer displayer( aStudy );
+  GEOM_Displayer displayer;
 
   int aMgrId = viewWindow->getViewManager()->getGlobalId();
 
@@ -631,7 +627,7 @@ void DisplayGUI::ChangeDisplayMode( const int mode, SUIT_ViewWindow* viewWindow
   aSelMgr->selectedObjects( selected );
   if ( selected.IsEmpty() ) return;
 
-  GEOM_Displayer displayer( aStudy );
+  GEOM_Displayer displayer;
 
   int mgrId = viewWindow->getViewManager()->getGlobalId();
 
index 314c657606109e5beafe1ba2bfc540919855c15d..731acd9997645e18e31bafb9649bf2b3b7848ffc 100644 (file)
 
 OCCT_IMPLEMENT_STANDARD_RTTIEXT(GEOM_BaseDriver,TFunction_Driver);
 
-//================================================================================
-/*!
- * Returns document id
- */
-//================================================================================
-int GEOM_BaseDriver::GetDocID() const
-{
-  int docId = 0;
-  if (!Label().IsNull()) {
-    Handle(TDocStd_Document) aDoc = TDocStd_Owner::GetDocument(Label().Data());
-    docId = GEOM_Engine::GetEngine()->GetDocID(aDoc);
-  }
-  return docId;
-}
-
 //================================================================================
 /*!
  * \brief Returns a name of creation operation and names and values of creation parameters
index 61aa70f6ae7a275ab7131609bd94bb98641d08f8..ea27b563507d42ae356b5c7ee4ab05e2af62cc81 100644 (file)
@@ -76,8 +76,6 @@ struct GEOM_Param
 class GEOM_BaseDriver : public TFunction_Driver
 {
 public:
-  // Returns document id
-  Standard_EXPORT int GetDocID() const;
   
   // Returns a name of creation operation and names and values of creation parameters
   // (Use AddParam() methods declared below to fill params vector while implementing
index 28e98d7aba1465b53a4a1e3c3beb8941fa9452f8..3fe3857e1462bb4ecf60c256c90f5c55d799946d 100644 (file)
@@ -85,15 +85,9 @@ Handle(GEOM_BaseObject) GEOM_BaseObject::GetObject(const TDF_Label& theLabel)
   TCollection_AsciiString anEntry;
   TDF_Tool::Entry(theLabel, anEntry);
 
-  Handle(TDocStd_Document) aDoc = TDocStd_Owner::GetDocument(theLabel.Data());
-  if(aDoc.IsNull()) return NULL;
-
-  Handle(TDataStd_Integer) anID;
-  if(!aDoc->Main().FindAttribute(TDataStd_Integer::GetID(), anID)) return NULL;
-
   GEOM_Engine* anEngine = GEOM_Engine::GetEngine();
   if(anEngine == NULL) return NULL;
-  return anEngine->GetObject(anID->Get(), anEntry.ToCString());
+  return anEngine->GetObject(anEntry.ToCString());
 }
 
 //=============================================================================
@@ -167,14 +161,8 @@ int GEOM_BaseObject::GetType(const TDF_Label& theLabel)
  */
 //=============================================================================
 GEOM_BaseObject::GEOM_BaseObject(const TDF_Label& theEntry)
-  : _label(theEntry), _ior(""), _docID(-1)
+  : _label(theEntry), _ior("")
 {
-  Handle(TDocStd_Document) aDoc = TDocStd_Owner::GetDocument(_label.Data());
-  if(!aDoc.IsNull()) {
-    Handle(TDataStd_Integer) anID;
-    if(aDoc->Main().FindAttribute(TDataStd_Integer::GetID(), anID)) _docID = anID->Get();
-  }
-
   if(!theEntry.FindAttribute(TDataStd_TreeNode::GetDefaultTreeID(), _root))
     _root = TDataStd_TreeNode::Set(theEntry);
 }
@@ -185,14 +173,8 @@ GEOM_BaseObject::GEOM_BaseObject(const TDF_Label& theEntry)
  */
 //=============================================================================
 GEOM_BaseObject::GEOM_BaseObject(const TDF_Label& theEntry, int theType)
-: _label(theEntry), _ior(""), _docID(-1)
+: _label(theEntry), _ior("")
 {
-  Handle(TDocStd_Document) aDoc = TDocStd_Owner::GetDocument(_label.Data());
-  if(!aDoc.IsNull()) {
-    Handle(TDataStd_Integer) anID;
-    if(aDoc->Main().FindAttribute(TDataStd_Integer::GetID(), anID)) _docID = anID->Get();
-  }
-
   theEntry.ForgetAllAttributes(Standard_True);
 
   if(!theEntry.FindAttribute(TDataStd_TreeNode::GetDefaultTreeID(), _root))
@@ -288,17 +270,6 @@ void GEOM_BaseObject::IncrementTic()
   TDataStd_Integer::Set(aTicLabel, aTic + 1);
 }
 
-
-//=============================================================================
-/*!
- *  GetDocID
- */
-//=============================================================================
-int GEOM_BaseObject::GetDocID()
-{
-  return _docID;
-}
-
 //=============================================================================
 /*!
  *  SetName
index 0c7a65dfc6c91ba63e7b69a5d8850e3e23bac634..4c9ed3cf8547bf5bd3106951cd49b9ec43f2e6f9 100644 (file)
@@ -92,9 +92,6 @@ public:
   Standard_EXPORT void SetTic(int theTic);
   Standard_EXPORT void IncrementTic();
 
-  //Returns an ID of the OCAF document where this GEOM_BaseObject is stored
-  Standard_EXPORT int GetDocID();
-
   //Sets a name of this GEOM_BaseObject
   Standard_EXPORT void SetName(const char* theName);
 
@@ -163,7 +160,6 @@ public:
   TDF_Label                 _label;
   TCollection_AsciiString   _ior;
   TCollection_AsciiString   _parameters;
-  int                       _docID;
 
 public:
   OCCT_DEFINE_STANDARD_RTTIEXT(GEOM_BaseObject,Standard_Transient)
index bfd101415e33725f9e753dd1529a03109d54747a..1386f6c7794517ce617b38dcd9237be1497059b5 100644 (file)
@@ -100,24 +100,9 @@ static GEOM_Engine* TheEngine = NULL;
 
 static TCollection_AsciiString BuildIDFromObject(Handle(GEOM_BaseObject)& theObject)
 {
-  TCollection_AsciiString anID(theObject->GetDocID()), anEntry;
+  TCollection_AsciiString anEntry;
   TDF_Tool::Entry(theObject->GetEntry(), anEntry);
-  anID+=(TCollection_AsciiString("_")+anEntry);
-  return anID;
-}
-
-static TCollection_AsciiString BuildID(Standard_Integer theDocID, const char* theEntry)
-{
-  TCollection_AsciiString anID(theDocID);
-  anID+=(TCollection_AsciiString("_")+theEntry);
-  return anID;
-}
-
-static Standard_Integer ExtractDocID(TCollection_AsciiString& theID)
-{
-  TCollection_AsciiString aDocID = theID.Token("_");
-  if(aDocID.Length() < 1) return -1;
-  return aDocID.IntegerValue();
+  return anEntry;
 }
 
 bool ProcessFunction(Handle(GEOM_Function)&             theFunction,
@@ -146,11 +131,10 @@ void ReplaceEntriesByNames (TCollection_AsciiString&                  theScript,
                             Standard_Integer&                         objectCounter,
                             Resource_DataMapOfAsciiStringAsciiString& aNameToEntry);
 
-void AddObjectColors (int                      theDocID,
-                      TCollection_AsciiString& theScript,
+void AddObjectColors (TCollection_AsciiString& theScript,
                       const TSting2ObjDataMap& theEntry2ObjData);
 
-void AddTextures (int theDocID, TCollection_AsciiString& theScript);
+void AddTextures (TCollection_AsciiString& theScript);
 
 void PublishObject (TObjectData&                              theObjectData,
                     TSting2ObjDataMap&                        theEntry2ObjData,
@@ -252,14 +236,8 @@ GEOM_Engine::~GEOM_Engine()
   for(objit = objs.begin(); objit != objs.end(); ++objit)
     RemoveObject(*objit);
 
-  //Close all documents not closed
-  TColStd_DataMapIteratorOfDataMapOfIntegerTransient anItr (_mapIDDocument);
-  for (; anItr.More(); anItr.Next())
-  {
-    Close(anItr.Key());
-    anItr.Initialize( _mapIDDocument ); // anItr becomes invalid at _mapIDDocument.UnBind(docId)
-  }
-  _mapIDDocument.Clear();
+  //Close document
+  Close();
   _objects.Clear();
 }
 
@@ -268,11 +246,11 @@ GEOM_Engine::~GEOM_Engine()
  *  GetDocument
  */
 //=============================================================================
-Handle(TDocStd_Document) GEOM_Engine::GetDocument(int theDocID, bool force)
+Handle(TDocStd_Document) GEOM_Engine::GetDocument(bool force)
 {
   Handle(TDocStd_Document) aDoc;
-  if(_mapIDDocument.IsBound(theDocID)) {
-    aDoc = Handle(TDocStd_Document)::DownCast(_mapIDDocument(theDocID));
+  if (_document) {
+    aDoc = _document;
   }
   else if (force) {
 #if OCC_VERSION_MAJOR > 6
@@ -281,44 +259,26 @@ Handle(TDocStd_Document) GEOM_Engine::GetDocument(int theDocID, bool force)
     _OCAFApp->NewDocument("SALOME_GEOM", aDoc);
 #endif
     aDoc->SetUndoLimit(_UndoLimit);
-    _mapIDDocument.Bind(theDocID, aDoc);
-    TDataStd_Integer::Set(aDoc->Main(), theDocID);
+    _document = aDoc;
   }
   return aDoc;
 }
 
-//=============================================================================
-/*!
- *  GetDocID
- */
-//=============================================================================
-int GEOM_Engine::GetDocID(Handle(TDocStd_Document) theDocument)
-{
-  if (theDocument.IsNull()) return -1;
-  TColStd_DataMapIteratorOfDataMapOfIntegerTransient anItr (_mapIDDocument);
-  for (; anItr.More(); anItr.Next())
-    if (anItr.Value() == theDocument) return anItr.Key();
-
-  return -1;
-}
-
 //=============================================================================
 /*!
  *  GetObject
  */
 //=============================================================================
 
-Handle(GEOM_BaseObject) GEOM_Engine::GetObject(int theDocID, const char* theEntry, bool force)
+Handle(GEOM_BaseObject) GEOM_Engine::GetObject(const char* theEntry, bool force)
 {
   Handle(GEOM_BaseObject) anObject;
 
-  TCollection_AsciiString anID = BuildID(theDocID, theEntry);
-
-  if (_objects.IsBound(anID)) {
-    anObject = Handle(GEOM_BaseObject)::DownCast(_objects(anID));
+  if (_objects.IsBound(theEntry)) {
+    anObject = Handle(GEOM_BaseObject)::DownCast(_objects(theEntry));
   }
   else if (force) {
-    Handle(TDocStd_Document) aDoc = GetDocument(theDocID, force);
+    Handle(TDocStd_Document) aDoc = GetDocument(force);
     if ( !aDoc.IsNull()) {
       TDF_Label aLabel;
       TDF_Tool::Label(aDoc->Main().Data(), theEntry, aLabel, Standard_True);
@@ -329,7 +289,7 @@ Handle(GEOM_BaseObject) GEOM_Engine::GetObject(int theDocID, const char* theEntr
         case GEOM_FIELD_STEP_OBJTYPE: anObject = new GEOM_FieldStep(aLabel); break;
         default:                      anObject = new GEOM_Object   (aLabel);
         }
-        _objects.Bind(anID, anObject);
+        _objects.Bind(theEntry, anObject);
       }
     }
   }
@@ -343,22 +303,19 @@ Handle(GEOM_BaseObject) GEOM_Engine::GetObject(int theDocID, const char* theEntr
  */
 //=============================================================================
 
-Handle(GEOM_BaseObject) GEOM_Engine::AddBaseObject(int theDocID, int theType)
+Handle(GEOM_BaseObject) GEOM_Engine::AddBaseObject(int theType)
 {
-  Handle(TDocStd_Document) aDoc = GetDocument(theDocID);
+  Handle(TDocStd_Document) aDoc = GetDocument();
   Handle(TDataStd_TreeNode) aRoot = TDataStd_TreeNode::Set(aDoc->Main());
 
   // NPAL18604: use existing label to decrease memory usage,
   //            if this label has been freed (object deleted)
   bool useExisting = false;
   TDF_Label aChild;
-  if (_freeLabels.find(theDocID) != _freeLabels.end()) {
-    std::list<TDF_Label>& aFreeLabels = _freeLabels[theDocID];
-    if (!aFreeLabels.empty()) {
-      useExisting = true;
-      aChild = aFreeLabels.front();
-      aFreeLabels.pop_front();
-    }
+  if (!_freeLabels.empty()) {
+    useExisting = true;
+    aChild = _freeLabels.front();
+    _freeLabels.pop_front();
   }
   if (!useExisting) {
     // create new label
@@ -386,9 +343,9 @@ Handle(GEOM_BaseObject) GEOM_Engine::AddBaseObject(int theDocID, int theType)
  */
 //================================================================================
 
-Handle(GEOM_Object) GEOM_Engine::AddObject(int theDocID, int theType)
+Handle(GEOM_Object) GEOM_Engine::AddObject(int theType)
 {
-  return Handle(GEOM_Object)::DownCast( AddBaseObject(theDocID, theType) );
+  return Handle(GEOM_Object)::DownCast( AddBaseObject(theType) );
 }
 
 //=============================================================================
@@ -403,21 +360,17 @@ Handle(GEOM_Object) GEOM_Engine::AddSubShape(Handle(GEOM_Object)              th
 {
   if (theMainShape.IsNull() || theIndices.IsNull()) return NULL;
 
-  Handle(TDocStd_Document) aDoc = GetDocument(theMainShape->GetDocID());
+  Handle(TDocStd_Document) aDoc = GetDocument();
   Handle(TDataStd_TreeNode) aRoot = TDataStd_TreeNode::Set(aDoc->Main());
 
   // NPAL18604: use existing label to decrease memory usage,
   //            if this label has been freed (object deleted)
   bool useExisting = false;
-  TDF_Label aChild;
-  int aDocID = theMainShape->GetDocID();
-  if (_freeLabels.find(aDocID) != _freeLabels.end()) {
-    std::list<TDF_Label>& aFreeLabels = _freeLabels[aDocID];
-    if (!aFreeLabels.empty()) {
-      useExisting = true;
-      aChild = aFreeLabels.front();
-      aFreeLabels.pop_front();
-    }
+  TDF_Label aChild;;
+  if (!_freeLabels.empty()) {
+    useExisting = true;
+    aChild = _freeLabels.front();
+    _freeLabels.pop_front();
   }
   if (!useExisting) {
     // create new label
@@ -479,8 +432,7 @@ bool GEOM_Engine::RemoveObject(Handle(GEOM_BaseObject)& theObject)
 {
   if (theObject.IsNull()) return false;
 
-  int aDocID = theObject->GetDocID();
-  if(!_mapIDDocument.IsBound(aDocID))
+  if(!_document)
     return false;  // document is closed...
 
   //Remove an object from the map of available objects
@@ -515,16 +467,14 @@ bool GEOM_Engine::RemoveObject(Handle(GEOM_BaseObject)& theObject)
   aLabel.ForgetAllAttributes(Standard_True);
 
   // Remember the label to reuse it then
-  std::list<TDF_Label>& aFreeLabels = _freeLabels[aDocID];
-  if ( aFreeLabels.empty() || aFreeLabels.back() != aLabel )
-    aFreeLabels.push_back(aLabel);
+  if ( _freeLabels.empty() || _freeLabels.back() != aLabel )
+    _freeLabels.push_back(aLabel);
 
   // we can't explicitely delete theObject. At least prevent its functioning
   // as an alive object when aLabel is reused for a new object
   theObject->_label = aLabel.Root();
   theObject->_ior.Clear();
-  theObject->_parameters.Clear();
-  theObject->_docID = -1;
+  theObject->_parameters.Clear();;
 
   theObject.Nullify();
 
@@ -536,9 +486,9 @@ bool GEOM_Engine::RemoveObject(Handle(GEOM_BaseObject)& theObject)
  *  Undo
  */
 //=============================================================================
-void GEOM_Engine::Undo(int theDocID)
+void GEOM_Engine::Undo()
 {
-  GetDocument(theDocID)->Undo();
+  GetDocument()->Undo();
 }
 
 //=============================================================================
@@ -546,9 +496,9 @@ void GEOM_Engine::Undo(int theDocID)
  *  Redo
  */
 //=============================================================================
-void GEOM_Engine::Redo(int theDocID)
+void GEOM_Engine::Redo()
 {
-  GetDocument(theDocID)->Redo();
+  GetDocument()->Redo();
 }
 
 //=============================================================================
@@ -556,12 +506,11 @@ void GEOM_Engine::Redo(int theDocID)
  *  Save
  */
 //=============================================================================
-bool GEOM_Engine::Save(int theDocID, const char* theFileName)
+bool GEOM_Engine::Save(const char* theFileName)
 {
-  if(!_mapIDDocument.IsBound(theDocID)) return false;
-  Handle(TDocStd_Document) aDoc = Handle(TDocStd_Document)::DownCast(_mapIDDocument(theDocID));
+  if(!_document) return false;
 
-  _OCAFApp->SaveAs(aDoc, theFileName);
+  _OCAFApp->SaveAs(_document, theFileName);
 
   return true;
 }
@@ -571,7 +520,7 @@ bool GEOM_Engine::Save(int theDocID, const char* theFileName)
  *  Load
  */
 //=============================================================================
-bool GEOM_Engine::Load(int theDocID, const char* theFileName)
+bool GEOM_Engine::Load(const char* theFileName)
 {
   Handle(TDocStd_Document) aDoc;
   if (_OCAFApp->Open(theFileName, aDoc) != PCDM_RS_OK) {
@@ -587,10 +536,7 @@ bool GEOM_Engine::Load(int theDocID, const char* theFileName)
 
   aDoc->SetUndoLimit(_UndoLimit);
 
-  if(_mapIDDocument.IsBound(theDocID)) _mapIDDocument.UnBind(theDocID);
-  _mapIDDocument.Bind(theDocID, aDoc);
-
-  TDataStd_Integer::Set(aDoc->Main(), theDocID);
+  _document = aDoc;
 
   return true;
 }
@@ -600,30 +546,19 @@ bool GEOM_Engine::Load(int theDocID, const char* theFileName)
  *  Close
  */
 //=============================================================================
-void GEOM_Engine::Close(int theDocID)
+void GEOM_Engine::Close()
 {
-  if (_mapIDDocument.IsBound(theDocID)) {
-    Handle(TDocStd_Document) aDoc = Handle(TDocStd_Document)::DownCast(_mapIDDocument(theDocID));
-
-    //Remove all GEOM Objects associated to the given document
-    TColStd_SequenceOfAsciiString aSeq;
+  if (_document) {
+    //Remove all GEOM Objects associated to the document
     GEOM_DataMapIteratorOfDataMapOfAsciiStringTransient It (_objects);
-    for (; It.More(); It.Next()) {
-      TCollection_AsciiString anObjID (It.Key());
-      Standard_Integer anID = ExtractDocID(anObjID);
-      if (theDocID == anID) aSeq.Append(It.Key());
-    }
-    for (Standard_Integer i=1; i<=aSeq.Length(); i++) _objects.UnBind(aSeq.Value(i));
+    for (; It.More(); It.Next())
+      _objects.UnBind(It.Key());
 
-    // Forget free labels for this document
-    TFreeLabelsList::iterator anIt = _freeLabels.find(theDocID);
-    if (anIt != _freeLabels.end()) {
-      _freeLabels.erase(anIt);
-    }
+    // Forget free labels for document
+    _freeLabels.clear();
 
-    _mapIDDocument.UnBind(theDocID);
-    _OCAFApp->Close(aDoc);
-    aDoc.Nullify();
+    _OCAFApp->Close(_document);
+    _document.Nullify();
   }
 }
 
@@ -632,8 +567,7 @@ void GEOM_Engine::Close(int theDocID)
  *  DumpPython
  */
 //=============================================================================
-TCollection_AsciiString GEOM_Engine::DumpPython(int theDocID,
-                                                std::vector<TObjectData>& theObjectData,
+TCollection_AsciiString GEOM_Engine::DumpPython(std::vector<TObjectData>& theObjectData,
                                                 TVariablesList theVariables,
                                                 bool isPublished,
                                                 bool isMultiFile, 
@@ -643,7 +577,7 @@ TCollection_AsciiString GEOM_Engine::DumpPython(int theDocID,
   Kernel_Utils::Localizer loc;
 
   TCollection_AsciiString aScript;
-  Handle(TDocStd_Document) aDoc = GetDocument(theDocID);
+  Handle(TDocStd_Document) aDoc = GetDocument();
 
   if (aDoc.IsNull())
   {
@@ -662,7 +596,7 @@ TCollection_AsciiString GEOM_Engine::DumpPython(int theDocID,
 
   aScript += "\n\tgeompy = geomBuilder.New(theStudy)\n";
 
-  AddTextures(theDocID, aScript);
+  AddTextures(aScript);
 
   Standard_Integer posToInsertGlobalVars = aScript.Length() + 1;
 
@@ -798,7 +732,7 @@ TCollection_AsciiString GEOM_Engine::DumpPython(int theDocID,
   aScript += aFuncScript;
 
   // ouv : NPAL12872
-  AddObjectColors( theDocID, aScript, aEntry2ObjData );
+  AddObjectColors(aScript, aEntry2ObjData );
 
   // Make script to publish in study
   TSting2ObjDataPtrMap::iterator aStEntry2ObjDataPtrIt;
@@ -908,24 +842,21 @@ Handle(TColStd_HSequenceOfAsciiString) GEOM_Engine::GetAllDumpNames() const
 #define TEXTURE_LABEL_HEIGHT   4
 #define TEXTURE_LABEL_DATA     5
 
-int GEOM_Engine::addTexture(int theDocID, int theWidth, int theHeight,
+int GEOM_Engine::addTexture(int theWidth, int theHeight,
                             const Handle(TColStd_HArray1OfByte)& theTexture,
                             const TCollection_AsciiString& theFileName)
 {
-  Handle(TDocStd_Document) aDoc = GetDocument(theDocID);
+  Handle(TDocStd_Document) aDoc = GetDocument();
   Handle(TDataStd_TreeNode) aRoot = TDataStd_TreeNode::Set(aDoc->Main());
 
   // NPAL18604: use existing label to decrease memory usage,
   //            if this label has been freed (object deleted)
   bool useExisting = false;
   TDF_Label aChild;
-  if (_freeLabels.find(theDocID) != _freeLabels.end()) {
-    std::list<TDF_Label>& aFreeLabels = _freeLabels[theDocID];
-    if (!aFreeLabels.empty()) {
-      useExisting = true;
-      aChild = aFreeLabels.front();
-      aFreeLabels.pop_front();
-    }
+  if (!_freeLabels.empty()) {
+    useExisting = true;
+    aChild = _freeLabels.front();
+    _freeLabels.pop_front();
   }
   if (!useExisting) {
     // create new label
@@ -954,14 +885,14 @@ int GEOM_Engine::addTexture(int theDocID, int theWidth, int theHeight,
   return aTextureID;
 }
 
-Handle(TColStd_HArray1OfByte) GEOM_Engine::getTexture(int theDocID, int theTextureID,
+Handle(TColStd_HArray1OfByte) GEOM_Engine::getTexture(int theTextureID,
                                                       int& theWidth, int& theHeight,
                                                       TCollection_AsciiString& theFileName)
 {
   Handle(TColStd_HArray1OfByte) anArray;
   theWidth = theHeight = 0;
 
-  Handle(TDocStd_Document) aDoc = GetDocument(theDocID);
+  Handle(TDocStd_Document) aDoc = GetDocument();
 
   TDF_ChildIterator anIterator(aDoc->Main(), Standard_True);
   bool found = false;
@@ -995,11 +926,11 @@ Handle(TColStd_HArray1OfByte) GEOM_Engine::getTexture(int theDocID, int theTextu
   return anArray;
 }
 
-std::list<int> GEOM_Engine::getAllTextures(int theDocID)
+std::list<int> GEOM_Engine::getAllTextures()
 {
   std::list<int> id_list;
 
-  Handle(TDocStd_Document) aDoc = GetDocument(theDocID);
+  Handle(TDocStd_Document) aDoc = GetDocument();
 
   TDF_ChildIterator anIterator(aDoc->Main(), Standard_True);
   for (; anIterator.More(); anIterator.Next()) {
@@ -1014,17 +945,6 @@ std::list<int> GEOM_Engine::getAllTextures(int theDocID)
   return id_list;
 }
 
-void GEOM_Engine::DocumentModified(const int theDocId, const bool isModified)
-{
-  if (isModified) _mapModifiedDocs.Add(theDocId);
-  else _mapModifiedDocs.Remove(theDocId);
-}
-bool GEOM_Engine::DocumentModified(const int theDocId)
-{
-  return _mapModifiedDocs.Contains(theDocId);
-}
-
 //===========================================================================
 //                     Internal functions
 //===========================================================================
@@ -1665,12 +1585,11 @@ void ReplaceEntriesByNames (TCollection_AsciiString&                  theScript,
  *  AddObjectColors: Add color to objects
  */
 //=============================================================================
-void AddObjectColors (int                      theDocID,
-                      TCollection_AsciiString& theScript,
+void AddObjectColors (TCollection_AsciiString& theScript,
                       const TSting2ObjDataMap& theEntry2ObjData)
 {
   GEOM_Engine* engine = GEOM_Engine::GetEngine();
-  Handle(TDocStd_Document) aDoc = engine->GetDocument(theDocID);
+  Handle(TDocStd_Document) aDoc = engine->GetDocument();
 
   TSting2ObjDataMap::const_iterator anEntryToNameIt;
   for (anEntryToNameIt = theEntry2ObjData.begin();
@@ -1774,10 +1693,10 @@ static TCollection_AsciiString pack_data (const Handle(TColStd_HArray1OfByte)& a
   return stream;
 }
 
-void AddTextures (int theDocID, TCollection_AsciiString& theScript)
+void AddTextures (TCollection_AsciiString& theScript)
 {
   GEOM_Engine* engine = GEOM_Engine::GetEngine();
-  std::list<int> allTextures = engine->getAllTextures(theDocID);
+  std::list<int> allTextures = engine->getAllTextures();
   std::list<int>::const_iterator it;
 
   if (allTextures.size() > 0) {
@@ -1788,7 +1707,7 @@ void AddTextures (int theDocID, TCollection_AsciiString& theScript)
       Standard_Integer aWidth, aHeight;
       TCollection_AsciiString aFileName;
       Handle(TColStd_HArray1OfByte) aTexture =
-        engine->getTexture(theDocID, *it, aWidth, aHeight, aFileName);
+        engine->getTexture(*it, aWidth, aHeight, aFileName);
       if (aWidth > 0 && aHeight > 0 && !aTexture.IsNull() && aTexture->Length() > 0 ) {
         TCollection_AsciiString aCommand = "\n\t";
         aCommand += "texture_map["; aCommand += *it; aCommand += "] = ";
index 564774078010bbbbcd5412e0f060befecb7c1078..b9bef5fbf3a5b0bf1fb252ef759c538a7047bdc7 100644 (file)
@@ -99,53 +99,48 @@ class GEOM_Engine
   Standard_EXPORT static GEOM_Engine* GetEngine();   
 
   //Returns the OCAF document by its ID, if document doesn't exists it will be created
-  Standard_EXPORT Handle(TDocStd_Document) GetDocument(int theDocID, bool force=true);
-
-  //Returns the ID of the given OCAF document
-  Standard_EXPORT int GetDocID(Handle(TDocStd_Document) theDocument);
+  Standard_EXPORT Handle(TDocStd_Document) GetDocument(bool force=true);
   
   //Returns the OCAF appliaction
   Standard_EXPORT Handle(TDocStd_Application) GetApplication() { return _OCAFApp; }
 
   //Returns a pointer to GEOM_BaseObject defined by a document and the entry
-  Standard_EXPORT Handle(GEOM_BaseObject) GetObject(int         theDocID,
-                                                    const char* theEntry,
+  Standard_EXPORT Handle(GEOM_BaseObject) GetObject(const char* theEntry,
                                                     bool        force=true);
 
   //Adds a new object of the type theType in the OCAF document
-  Standard_EXPORT Handle(GEOM_BaseObject) AddBaseObject(int theDocID, int theType);
+  Standard_EXPORT Handle(GEOM_BaseObject) AddBaseObject(int theType);
 
   //Adds a new object of the type theType in the OCAF document
-  Standard_EXPORT Handle(GEOM_Object) AddObject(int theDocID, int theType);
+  Standard_EXPORT Handle(GEOM_Object) AddObject(int theType);
 
   //Removes the object from the OCAF document
   Standard_EXPORT bool RemoveObject(Handle(GEOM_BaseObject)& theObject);  
 
-  //Saves the OCAF document with ID = theDocID with file with name theFileName
-  Standard_EXPORT bool Save(int theDocID, const char* theFileName);
+  //Saves the OCAF document with file with name theFileName
+  Standard_EXPORT bool Save(const char* theFileName);
   
-  //Loads the OCAF document into the application and assigns to it an ID = theDocID
-  Standard_EXPORT bool Load(int theDocID, const char* theFileName);
+  //Loads the OCAF document into the application
+  Standard_EXPORT bool Load(const char* theFileName);
 
-  //Closes the document with ID =  theDocID
-  Standard_EXPORT void Close(int theDocID);
+  //Closes the document
+  Standard_EXPORT void Close();
 
   //Sets the number of Undos (default value = 10)
   Standard_EXPORT void SetUndoLimit(int theLimit) { _UndoLimit = theLimit; }
 
-  //Applies an Undo to document with ID = theDocID
-  Standard_EXPORT void Undo(int theDocID);
+  //Applies an Undo to document
+  Standard_EXPORT void Undo();
 
-  //Applies an Redo to document with ID = theDocID
-  Standard_EXPORT void Redo(int theDocID);
+  //Applies an Redo to document
+  Standard_EXPORT void Redo();
 
   //Adds a new sub-shape object of the MainShape object
   Standard_EXPORT Handle(GEOM_Object) AddSubShape(Handle(GEOM_Object) theMainShape, 
                                                   Handle(TColStd_HArray1OfInteger) theIndices,
                                                   bool isStandaloneOperation = false);
 
-  Standard_EXPORT TCollection_AsciiString DumpPython(int theDocID, 
-                                                     std::vector<TObjectData>& theObjectData,
+  Standard_EXPORT TCollection_AsciiString DumpPython(std::vector<TObjectData>& theObjectData,
                                                      TVariablesList theVariables,
                                                      bool isPublished, 
                                                      bool isMultiFile, 
@@ -155,15 +150,15 @@ class GEOM_Engine
 
   Standard_EXPORT Handle(TColStd_HSequenceOfAsciiString) GetAllDumpNames() const;
 
-  Standard_EXPORT int addTexture(int theDocID, int theWidth, int theHeight,
+  Standard_EXPORT int addTexture(int theWidth, int theHeight,
                                  const Handle(TColStd_HArray1OfByte)& theTexture,
                                  const TCollection_AsciiString& theFileName = "");
 
-  Standard_EXPORT Handle(TColStd_HArray1OfByte) getTexture(int  theDocID, int theTextureID,
+  Standard_EXPORT Handle(TColStd_HArray1OfByte) getTexture(int theTextureID,
                                                            int& theWidth, int& theHeight,
                                                            TCollection_AsciiString& theFileName);
 
-  Standard_EXPORT std::list<int> getAllTextures(int theDocID);
+  Standard_EXPORT std::list<int> getAllTextures();
 
   static const Standard_GUID& GetTextureGUID();
 
@@ -171,25 +166,20 @@ class GEOM_Engine
                                    const TCollection_AsciiString&            anEntry,
                                    Resource_DataMapOfAsciiStringAsciiString& aNameToEntry);
 
-  Standard_EXPORT void DocumentModified(const int theDocId, const bool isModified);
-  
-  Standard_EXPORT bool DocumentModified(const int theDocId);
-
  protected:
   Standard_EXPORT static void SetEngine(GEOM_Engine* theEngine);       
   
  private:
 
   Handle(GEOM_Application)  _OCAFApp;
-  TColStd_DataMapOfIntegerTransient _mapIDDocument;
-  TColStd_MapOfInteger _mapModifiedDocs; // keeps the identifiers of the modified document ids
+  Handle(TDocStd_Document) _document;
 
   int _UndoLimit;
   GEOM_DataMapOfAsciiStringTransient _objects;
 
   Resource_DataMapOfAsciiStringAsciiString _studyEntry2NameMap;
 
-  TFreeLabelsList                          _freeLabels;
+  std::list<TDF_Label>  _freeLabels;
 };
 
 #endif
index b975e5d082f718417dc094dc5c74fb7d00c0cf13..7d77da1f3d52e0bf893451d690a95c832b933a99 100644 (file)
@@ -364,7 +364,7 @@ Handle(GEOM_FieldStep) GEOM_Field::AddStep(const int stepID, const int stamp)
   if(anEngine == NULL) return NULL;
 
   step = Handle(GEOM_FieldStep)::DownCast
-    ( anEngine->AddBaseObject( GetDocID(),GEOM_FIELD_STEP_OBJTYPE ));
+    ( anEngine->AddBaseObject( GEOM_FIELD_STEP_OBJTYPE ));
   if ( step.IsNull())
     return step;
 
index 66fe4791bf56777f9737d350afe854c078d452a2..0ca233d0a4eca30a75b9a93074d7a2336f479cb0 100644 (file)
@@ -38,8 +38,8 @@
  */
 //=============================================================================
 
-GEOM_IOperations::GEOM_IOperations(GEOM_Engine* theEngine, int theDocID)
-: _engine(theEngine), _docID(theDocID)
+GEOM_IOperations::GEOM_IOperations(GEOM_Engine* theEngine)
+: _engine(theEngine)
 {
   _solver = new GEOM_Solver(theEngine);
 }
@@ -64,7 +64,7 @@ GEOM_IOperations::~GEOM_IOperations()
 //=============================================================================   
 void GEOM_IOperations::StartOperation()
 {
-  Handle(TDocStd_Document) aDoc = _engine->GetDocument(_docID);
+  Handle(TDocStd_Document) aDoc = _engine->GetDocument();
   if(aDoc->GetUndoLimit() > 0) 
     aDoc->NewCommand();
 }
@@ -76,10 +76,9 @@ void GEOM_IOperations::StartOperation()
 //=============================================================================      
 void GEOM_IOperations::FinishOperation()
 {
-  Handle(TDocStd_Document) aDoc = _engine->GetDocument(_docID);
+  Handle(TDocStd_Document) aDoc = _engine->GetDocument();
   if(aDoc->GetUndoLimit() > 0) 
     aDoc->CommitCommand();
-  _engine->DocumentModified(_docID, true);
 }
 
 //=============================================================================
@@ -89,7 +88,7 @@ void GEOM_IOperations::FinishOperation()
 //=============================================================================   
 void GEOM_IOperations::AbortOperation()
 {
-  Handle(TDocStd_Document) aDoc = _engine->GetDocument(_docID);
+  Handle(TDocStd_Document) aDoc = _engine->GetDocument();
   aDoc->AbortCommand();
 }
    
index 098587a85f234521bc35c9b758e8c40b8ea5f52a..a4e16776e14317eb4352940d7a0d0e7f663977c2 100644 (file)
@@ -39,7 +39,7 @@
 class GEOM_IOperations
 {
  public:
-  Standard_EXPORT GEOM_IOperations(GEOM_Engine* theEngine, int theDocID);
+  Standard_EXPORT GEOM_IOperations(GEOM_Engine* theEngine);
   Standard_EXPORT ~GEOM_IOperations();
 
   //Starts a new operation (opens a tansaction)
@@ -73,15 +73,11 @@ class GEOM_IOperations
   //Return a pointer to Solver associated with this operation interface
   Standard_EXPORT GEOM_Solver* GetSolver() { return _solver; }
 
-  //Returns an ID of the OCAF document where this operation stores the data
-  Standard_EXPORT int GetDocID() { return _docID; }
-
  private:
   
   TCollection_AsciiString _errorCode;
   GEOM_Engine*   _engine;
   GEOM_Solver*   _solver;
-  int                     _docID;
 
 };
 
index 2e6475362eb7560f97cf761c4f84aa4de4230c74..5d6d5b212889cc2d30b0709bfb38c94e916dbada 100644 (file)
@@ -34,7 +34,7 @@
  *  Update
  */
 //=============================================================================
-bool GEOM_Solver::Update(int theDocID, TDF_LabelSequence& theSeq)
+bool GEOM_Solver::Update(TDF_LabelSequence& theSeq)
 {
   return false;
 } 
index 8d6b84c15e8b71b386f9a2d80f5bec748336b16a..c3518ca3449695332cf1559661f4539503ba3021 100644 (file)
@@ -35,9 +35,9 @@ class GEOM_Solver
   Standard_EXPORT GEOM_Solver(GEOM_Engine* theEngine) :_engine(theEngine) {}
   Standard_EXPORT ~GEOM_Solver() {}
 
-  //Update the values of all GEOM_Object in the document theDocID, theSeq will contain a list of touched labels
+  //Update the values of all GEOM_Object in the document, theSeq will contain a list of touched labels
   //Note: not Implemented
-  Standard_EXPORT bool Update(int theDocID, TDF_LabelSequence& theSeq); 
+  Standard_EXPORT bool Update(TDF_LabelSequence& theSeq);
  
   //Updates a value of theObject, theSeq will contain a list of touched labels
   //Note: not implemented
index ca3e73bda002cd78efb2eb439a53dc002c139276..145b6b8e516f8301ddaaf9ef07dda21270e78167 100755 (executable)
@@ -704,7 +704,7 @@ QString GEOMBase_Helper::getEntry( GEOM::GEOM_Object_ptr object ) const
 GEOM_Displayer* GEOMBase_Helper::getDisplayer()
 {
   if ( !myDisplayer )
-    myDisplayer = new GEOM_Displayer( getStudy() );
+    myDisplayer = new GEOM_Displayer();
   return myDisplayer;
 }
 
index 2e3218b1e20e66607f095845d6179bb8be58455c..6af17acd2617f799a252ce3d46eeef267027793a 100644 (file)
 #include <QHash>
 
 GEOMGUI_TextTreeWdg::GEOMGUI_TextTreeWdg( SalomeApp_Application* app )
-  : myDisplayer(NULL)
 {
   myStudy = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
-  myDisplayer = GEOM_Displayer( myStudy );
+  myDisplayer = GEOM_Displayer();
 
   SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
   myVisibleIcon = QIcon( resMgr->loadPixmap( "SUIT", tr( "ICON_DATAOBJ_VISIBLE" ) ) );
index 3ed44e128d1b52c1136dfbe5fc703b2148ca13d1..5ddf00ebcb725adcf2f7d34273f0985e201dc642 100644 (file)
@@ -459,15 +459,12 @@ static std::string getName( GEOM::GEOM_BaseObject_ptr object )
  *  Constructor
  */
 //=================================================================
-GEOM_Displayer::GEOM_Displayer( SalomeApp_Study* st )
+GEOM_Displayer::GEOM_Displayer()
 {
-  if( st )
-    myApp = dynamic_cast<SalomeApp_Application*>( st->application() );
-  else
-    myApp = 0;
+  SUIT_Session* session = SUIT_Session::session();
+  myApp = dynamic_cast<SalomeApp_Application*>( session->activeApplication() );
 
   /* Shading Color */
-  SUIT_Session* session = SUIT_Session::session();
   SUIT_ResourceMgr* resMgr = session->resourceMgr();
 
   QColor col = resMgr->colorValue( "Geometry", "shading_color", QColor( 255, 0, 0 ) );
@@ -779,7 +776,7 @@ void GEOM_Displayer::updateShapeProperties( const Handle(GEOM_AISShape)& AISShap
   int aMgrId = !anIO.IsNull() ? getViewManagerId( myViewFrame ) : -1;
 
   // get presentation properties
-  PropMap propMap = getObjectProperties( study, entry, myViewFrame );
+  PropMap propMap = getObjectProperties( entry, myViewFrame );
 
   // Temporary staff: vertex must be infinite for correct visualization
   AISShape->SetInfiniteState( myShape.Infinite() ); // || myShape.ShapeType() == TopAbs_VERTEX // VSR: 05/04/2010: Fix 20668 (Fit All for points & lines)
@@ -921,14 +918,14 @@ void GEOM_Displayer::updateShapeProperties( const Handle(GEOM_AISShape)& AISShap
     aImagePath = GetTexture().c_str();
     if ( ! entry.isEmpty() ) {
       // check that study is active
-      SalomeApp_Study* study = getActiveStudy();
+      SalomeApp_Study* study = getStudy();
       if ( study ) {
         // Store the texture in object properties for next displays
         study->setObjectProperty( aMgrId, entry, GEOM::propertyName( GEOM::Texture ), QString( GetTexture().c_str() ) );
         study->setObjectProperty( aMgrId, entry, GEOM::propertyName( GEOM::DisplayMode ), 3 );
         
         // Update propeties map
-        propMap = getObjectProperties( study, entry, myViewFrame );
+        propMap = getObjectProperties( entry, myViewFrame );
       }
     }
   }
@@ -986,7 +983,7 @@ void GEOM_Displayer::updateShapeProperties( const Handle(GEOM_AISShape)& AISShap
       int textureId = aList[0].toInt();
       Standard_Integer aWidth, aHeight;
       Handle(TColStd_HArray1OfByte) aTexture =
-        GeometryGUI::getTexture( study, textureId, aWidth, aHeight );
+        GeometryGUI::getTexture( textureId, aWidth, aHeight );
       if ( !aTexture.IsNull() ) {
         Handle(Prs3d_PointAspect) aTextureAspect =
           new Prs3d_PointAspect( HasColor() ? 
@@ -1049,7 +1046,7 @@ void GEOM_Displayer::updateActorProperties( GEOM_Actor* actor, bool create )
   int aMgrId = !anIO.IsNull() ? getViewManagerId( myViewFrame ) : -1;
 
   // get presentation properties
-  PropMap propMap = getObjectProperties( study, entry, myViewFrame );
+  PropMap propMap = getObjectProperties( entry, myViewFrame );
   QColor c;
 
   /////////////////////////////////////////////////////////////////////////
@@ -1738,49 +1735,43 @@ SALOME_Prs* GEOM_Displayer::buildPresentation( const QString& entry,
         // set interactive object
         setIO( theIO );
         //  Find SOBject (because shape should be published previously)
-        SUIT_Session* session = SUIT_Session::session();
-        SUIT_Application* app = session->activeApplication();
-        if ( app )
+        if ( getStudy() )
         {
-          SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
-          if ( study )
+          _PTR(SObject) SO ( getStudy()->studyDS()->FindObjectID( theIO->getEntry() ) );
+          if ( SO )
           {
-            _PTR(SObject) SO ( study->studyDS()->FindObjectID( theIO->getEntry() ) );
-            if ( SO )
+            // get CORBA reference to data object
+            CORBA::Object_var object = GeometryGUI::ClientSObjectToObject(SO);
+            if ( !CORBA::is_nil( object ) )
             {
-              // get CORBA reference to data object
-              CORBA::Object_var object = GeometryGUI::ClientSObjectToObject(SO);
-              if ( !CORBA::is_nil( object ) )
+              // downcast to GEOM base object
+              GEOM::GEOM_BaseObject_var GeomBaseObject = GEOM::GEOM_BaseObject::_narrow( object );
+              if ( !GeomBaseObject->_is_nil() )
               {
-                // downcast to GEOM base object
-                GEOM::GEOM_BaseObject_var GeomBaseObject = GEOM::GEOM_BaseObject::_narrow( object );
-                if ( !GeomBaseObject->_is_nil() )
-                {
-                  myType = GeomBaseObject->GetType();
+                myType = GeomBaseObject->GetType();
 
-                  // downcast to GEOM object
-                  GEOM::GEOM_Object_var GeomObject = GEOM::GEOM_Object::_narrow( GeomBaseObject );
-                  if ( myType == GEOM_FIELD_STEP )
+                // downcast to GEOM object
+                GEOM::GEOM_Object_var GeomObject = GEOM::GEOM_Object::_narrow( GeomBaseObject );
+                if ( myType == GEOM_FIELD_STEP )
+                {
+                  // get the GEOM object from the field's shape
+                  GEOM::GEOM_FieldStep_var GeomFieldStep = GEOM::GEOM_FieldStep::_narrow( GeomBaseObject );
+                  if ( !GeomFieldStep->_is_nil() )
                   {
-                    // get the GEOM object from the field's shape
-                    GEOM::GEOM_FieldStep_var GeomFieldStep = GEOM::GEOM_FieldStep::_narrow( GeomBaseObject );
-                    if ( !GeomFieldStep->_is_nil() )
-                    {
-                      GEOM::GEOM_Field_var GeomField = GeomFieldStep->GetField();
-                      if ( !GeomField->_is_nil() )
-                        GeomObject = GeomField->GetShape();
-                    }
-
-                    // read the field step information
-                    readFieldStepInfo( GeomFieldStep );
+                    GEOM::GEOM_Field_var GeomField = GeomFieldStep->GetField();
+                    if ( !GeomField->_is_nil() )
+                      GeomObject = GeomField->GetShape();
                   }
 
-                  if ( !GeomObject->_is_nil() )
-                  {
-                    theIO->setName( GeomObject->GetName() );
-                    // finally set shape
-                    setShape( GEOM_Client::get_client().GetShape( GeometryGUI::GetGeomGen(), GeomObject ) );
-                  }
+                  // read the field step information
+                  readFieldStepInfo( GeomFieldStep );
+                }
+
+                if ( !GeomObject->_is_nil() )
+                {
+                  theIO->setName( GeomObject->GetName() );
+                  // finally set shape
+                  setShape( GEOM_Client::get_client().GetShape( GeometryGUI::GetGeomGen(), GeomObject ) );
                 }
               }
             }
@@ -2459,21 +2450,20 @@ SALOMEDS::Color GEOM_Displayer::getUniqueColor( const QList<SALOMEDS::Color>& th
   return aSColor;
 }
 
-PropMap GEOM_Displayer::getObjectProperties( SalomeApp_Study* study,
-                                             const QString& entry,
+PropMap GEOM_Displayer::getObjectProperties( const QString& entry,
                                              SALOME_View* view )
 {
   // get default properties for the explicitly specified default view type
   PropMap propMap = GEOM_Displayer::getDefaultPropertyMap();
 
-  if ( study && view ) {
+  if ( getStudy() && view ) {
     SUIT_ViewModel* viewModel = dynamic_cast<SUIT_ViewModel*>( view );
     SUIT_ViewManager* viewMgr = ( viewModel != 0 ) ? viewModel->getViewManager() : 0;
     int viewId = ( viewMgr != 0 ) ? viewMgr->getGlobalId() : -1;
   
     if ( viewModel && viewId != -1 ) {
       // get properties from the study
-      PropMap storedMap = study->getObjectProperties( viewId, entry );
+      PropMap storedMap = getStudy()->getObjectProperties( viewId, entry );
       // overwrite default properties from stored ones (that are specified)
       for ( int prop = GEOM::Visibility; prop <= GEOM::LastProperty; prop++ ) {
         if ( storedMap.contains( GEOM::propertyName( (GEOM::Property)prop ) ) )
@@ -2493,7 +2483,7 @@ PropMap GEOM_Displayer::getObjectProperties( SalomeApp_Study* study,
 
       if ( !entry.isEmpty() ) {
         // get CORBA reference to geom object
-        _PTR(SObject) SO( study->studyDS()->FindObjectID( entry.toStdString() ) );
+        _PTR(SObject) SO( getStudy()->studyDS()->FindObjectID( entry.toStdString() ) );
         if ( SO ) {
           CORBA::Object_var object = GeometryGUI::ClientSObjectToObject( SO );
           if ( !CORBA::is_nil( object ) ) {
@@ -2691,16 +2681,9 @@ SALOMEDS::Color GEOM_Displayer::getColor(GEOM::GEOM_Object_var theGeomObject, bo
 
 
 void GEOM_Displayer::EraseWithChildren(const Handle(SALOME_InteractiveObject)& theIO,
-                                       const bool eraseOnlyChildren) {
-  SalomeApp_Application* app = dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication() );
-  if ( !app )
-    return;
-
-  SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
-  if ( !appStudy )
-    return;
-
-  LightApp_DataObject* parent = appStudy->findObjectByEntry(theIO->getEntry());
+                                       const bool eraseOnlyChildren)
+{
+  LightApp_DataObject* parent = getStudy()->findObjectByEntry(theIO->getEntry());
 
   if( !parent)
     return;
@@ -2708,7 +2691,7 @@ void GEOM_Displayer::EraseWithChildren(const Handle(SALOME_InteractiveObject)& t
   // Erase from all views
   QList<SALOME_View*> views;
   SALOME_View* view;
-  ViewManagerList vmans = app->viewManagers();
+  ViewManagerList vmans = myApp->viewManagers();
   SUIT_ViewManager* vman;
   foreach ( vman, vmans ) {
     SUIT_ViewModel* vmod = vman->getViewModel();
@@ -2974,10 +2957,6 @@ Standard_Boolean GEOM_Displayer::FindColor( const Standard_Real aValue,
 
 void GEOM_Displayer::UpdateColorScale( const bool theIsRedisplayFieldSteps, const bool updateViewer ) 
 {
-  SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>( myApp->activeStudy() );
-  if( !aStudy )
-    return;
-
   SOCC_Viewer* aViewModel = dynamic_cast<SOCC_Viewer*>( GetActiveView() );
   if( !aViewModel )
     return;
@@ -3092,14 +3071,14 @@ void GEOM_Displayer::UpdateColorScale( const bool theIsRedisplayFieldSteps, cons
 
   if( theIsRedisplayFieldSteps )
   {
-    _PTR(Study) aStudyDS = aStudy->studyDS();
+    _PTR(Study) aStudyDS = getStudy()->studyDS();
     QList<SUIT_ViewManager*> vmList;
     myApp->viewManagers( vmList );
     for( QList<SUIT_ViewManager*>::Iterator vmIt = vmList.begin(); vmIt != vmList.end(); vmIt++ )
     {
       if( SUIT_ViewManager* aViewManager = *vmIt )
       {
-        const ObjMap& anObjects = aStudy->getObjectProperties( aViewManager->getGlobalId() );
+        const ObjMap& anObjects = getStudy()->getObjectProperties( aViewManager->getGlobalId() );
         for( ObjMap::ConstIterator objIt = anObjects.begin(); objIt != anObjects.end(); objIt++ )
         {
           _PTR(SObject) aSObj( aStudyDS->FindObjectID( objIt.key().toLatin1().constData() ) );
index cf5a9df5536ac20be2197a3758db9829b29bcb61..5bac64528085286de4b0cb39f5e723ad081f54c4 100644 (file)
@@ -76,7 +76,7 @@ class GEOMGUI_EXPORT GEOM_Displayer : public LightApp_Displayer
 
 public:
   /* Constructor */
-  GEOM_Displayer( SalomeApp_Study* app );
+  GEOM_Displayer();
   /* Destructor */
   virtual ~GEOM_Displayer();
 
@@ -264,7 +264,7 @@ protected:
   void           updateActorProperties( GEOM_Actor*, bool );
   void           updateDimensions( const Handle(SALOME_InteractiveObject)&, SALOME_OCCPrs*, const gp_Ax3& );
 
-  PropMap getObjectProperties( SalomeApp_Study*, const QString&, SALOME_View* = 0 );
+  PropMap getObjectProperties( const QString&, SALOME_View* = 0 );
   PropMap getDefaultPropertyMap();
 
   /* Methods for reading the field step information */
index 20606e5e70dfe01cbca99cf762f3b6a07fcd6b3e..94325cb09216284a5ecdb686baeffc7f1736dbe4 100644 (file)
@@ -2094,7 +2094,7 @@ void GeometryGUI::onAutoBringToFront()
   SalomeApp_Study* appStudy = dynamic_cast< SalomeApp_Study* >( getApp()->activeStudy() );
   if (!appStudy) return;
 
-  GEOM_Displayer displayer( appStudy );
+  GEOM_Displayer displayer;
   
   SALOME_View* window = displayer.GetActiveView();
   if ( !window ) return;
@@ -2137,11 +2137,8 @@ void GeometryGUI::onAutoBringToFront()
 
 void GeometryGUI::updateFieldColorScale()
 {
-  if( SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>( getApp()->activeStudy() ) )
-  {
-    GEOM_Displayer aDisplayer( aStudy );
-    aDisplayer.UpdateColorScale();
-  }
+  GEOM_Displayer aDisplayer;
+  aDisplayer.UpdateColorScale();
 }
 
 QString GeometryGUI::engineIOR() const
@@ -2688,12 +2685,9 @@ void GeometryGUI::preferencesChanged( const QString& section, const QString& par
              param == QString("scalar_bar_height") ||
              param == QString("scalar_bar_text_height") ||
              param == QString("scalar_bar_nb_intervals")) {
-      if( SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>( getApp()->activeStudy() ) )
-      {
-        GEOM_Displayer aDisplayer( aStudy );
-        bool anIsRedisplayFieldSteps = param == QString("scalar_bar_nb_intervals");
-        aDisplayer.UpdateColorScale( anIsRedisplayFieldSteps, true );
-      }
+      GEOM_Displayer aDisplayer;
+      bool anIsRedisplayFieldSteps = param == QString("scalar_bar_nb_intervals");
+      aDisplayer.UpdateColorScale( anIsRedisplayFieldSteps, true );
     }
     else if ( param == QString("dimensions_color")        ||
               param == QString("dimensions_line_width")   ||
@@ -2711,13 +2705,7 @@ void GeometryGUI::preferencesChanged( const QString& section, const QString& par
         return;
       }
 
-      SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>( anApp->activeStudy() );
-      if ( !aStudy )
-      {
-        return;
-      }
-
-      GEOM_Displayer aDisplayer( aStudy );
+      GEOM_Displayer aDisplayer;
 
       ViewManagerList aVMs;
       anApp->viewManagers( OCCViewer_Viewer::Type(), aVMs );
@@ -2760,7 +2748,7 @@ void GeometryGUI::preferencesChanged( const QString& section, const QString& par
 LightApp_Displayer* GeometryGUI::displayer()
 {
   if ( !myDisplayer )
-    myDisplayer = new GEOM_Displayer( dynamic_cast<SalomeApp_Study*>( getApp()->activeStudy() ) );
+    myDisplayer = new GEOM_Displayer();
   return myDisplayer;
 }
 
@@ -3135,7 +3123,7 @@ void UpdateNameMode( SalomeApp_Application* app )
   bool isMode = false;
   SalomeApp_Study* aStudy = dynamic_cast< SalomeApp_Study* >( app->activeStudy() );
   SUIT_ViewWindow* viewWindow = app->desktop()->activeWindow();
-  GEOM_Displayer displayer( aStudy );
+  GEOM_Displayer displayer;
   int aMgrId = viewWindow->getViewManager()->getGlobalId();
 
   SALOME_View* window = displayer.GetActiveView();
@@ -3238,11 +3226,14 @@ void GeometryGUI::ClearShapeBuffer( GEOM::GEOM_Object_ptr theObj )
   TCollection_AsciiString asciiIOR( (char *)IOR.in() );
   GEOM_Client::get_client().RemoveShapeFromBuffer( asciiIOR );
 
-  SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( application()->activeStudy() );
-  if ( !appStudy )
-         return;
+  SalomeApp_Application* app =
+    dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication());
+  SalomeApp_Study* appStudy = app ? dynamic_cast<SalomeApp_Study*>( app->activeStudy() ) : 0;
 
-   _PTR(Study) aStudy = appStudy->studyDS();
+  if (!appStudy)
+    return;
+
+  _PTR(Study) aStudy = appStudy->studyDS();
 
   if ( !aStudy )
     return;
index 2ee22d9d98969a83946e37d2a5b819548abdbcdc..5e089e5781a2f2ee4c69c95af96926dd6f5453c4 100644 (file)
@@ -85,7 +85,7 @@ Standard_Integer GEOMImpl_ExportDriver::Execute(LOGBOOK& log) const
   if (aFileName.IsEmpty() || aFormatName.IsEmpty() || aLibName.IsEmpty())
     return 0;
 
-  if( !GEOMImpl_IECallBack::GetCallBack( aFormatName )->Export( GetDocID(), obj, aFileName, aFormatName ) );
+  if( !GEOMImpl_IECallBack::GetCallBack( aFormatName )->Export( obj, aFileName, aFormatName ) );
     return 0;
 
 #if OCC_VERSION_MAJOR < 7
index d3a54575db1999a795a98425fe2ca20cf721f449..64aed53d27f817850121847b560dde33adff7b22 100644 (file)
@@ -93,7 +93,6 @@
 GEOMImpl_Gen::GEOMImpl_Gen()
 {
    MESSAGE("GEOMImpl_Gen::GEOMImpl_Gen");
-   _mapOfBasicOperations.clear();
 
    // Basic elements
    TFunction_DriverTable::Get()->AddDriver(GEOMImpl_PointDriver::GetID(), new GEOMImpl_PointDriver());
@@ -182,57 +181,19 @@ GEOMImpl_Gen::~GEOMImpl_Gen()
 {
   MESSAGE("GEOMImpl_Gen::~GEOMImpl_Gen");
 
-  std::map<int, GEOMImpl_IBasicOperations*>::iterator aBasicIter = _mapOfBasicOperations.begin();
-  for (; aBasicIter != _mapOfBasicOperations.end(); aBasicIter++)
-    delete (*aBasicIter).second;
-
-  std::map<int, GEOMImpl_ITransformOperations*>::iterator aTransformIter = _mapOfTransformOperations.begin();
-  for (; aTransformIter != _mapOfTransformOperations.end(); aTransformIter++)
-    delete (*aTransformIter).second;
-
-  std::map<int, GEOMImpl_I3DPrimOperations*>::iterator a3DPrimIter = _mapOf3DPrimOperations.begin();
-  for (; a3DPrimIter != _mapOf3DPrimOperations.end(); a3DPrimIter++)
-    delete (*a3DPrimIter).second;
-
-  std::map<int, GEOMImpl_IShapesOperations*>::iterator aShapesIter = _mapOfShapesOperations.begin();
-  for (; aShapesIter != _mapOfShapesOperations.end(); aShapesIter++)
-    delete (*aShapesIter).second;
-
-  std::map<int, GEOMImpl_IBlocksOperations*>::iterator aBlocksIter = _mapOfBlocksOperations.begin();
-  for (; aBlocksIter != _mapOfBlocksOperations.end(); aBlocksIter++)
-    delete (*aBlocksIter).second;
-
-  std::map<int, GEOMImpl_IBooleanOperations*>::iterator aBooleanIter = _mapOfBooleanOperations.begin();
-  for (; aBooleanIter != _mapOfBooleanOperations.end(); aBooleanIter++)
-    delete (*aBooleanIter).second;
-
-  std::map<int, GEOMImpl_IHealingOperations*>::iterator aHealingIter = _mapOfHealingOperations.begin();
-  for (; aHealingIter != _mapOfHealingOperations.end(); aHealingIter++)
-    delete (*aHealingIter).second;
-
-  std::map<int, GEOMImpl_ICurvesOperations*>::iterator aCurvesIter = _mapOfCurvesOperations.begin();
-  for (; aCurvesIter != _mapOfCurvesOperations.end(); aCurvesIter++)
-    delete (*aCurvesIter).second;
-
-  std::map<int, GEOMImpl_ILocalOperations*>::iterator aLocalIter = _mapOfLocalOperations.begin();
-  for (; aLocalIter != _mapOfLocalOperations.end(); aLocalIter++)
-    delete (*aLocalIter).second;
-
-  std::map<int, GEOMImpl_IInsertOperations*>::iterator aInsertIter = _mapOfInsertOperations.begin();
-  for (; aInsertIter != _mapOfInsertOperations.end(); aInsertIter++)
-    delete (*aInsertIter).second;
-
-  std::map<int, GEOMImpl_IMeasureOperations*>::iterator aMeasureIter = _mapOfMeasureOperations.begin();
-  for (; aMeasureIter != _mapOfMeasureOperations.end(); aMeasureIter++)
-    delete (*aMeasureIter).second;
-
-  std::map<int, GEOMImpl_IGroupOperations*>::iterator aGroupIter = _mapOfGroupOperations.begin();
-  for (; aGroupIter != _mapOfGroupOperations.end(); aGroupIter++)
-    delete (*aGroupIter).second;
-
-  std::map<int, GEOMImpl_IFieldOperations*>::iterator aFieldIter = _mapOfFieldOperations.begin();
-  for (; aFieldIter != _mapOfFieldOperations.end(); aFieldIter++)
-    delete (*aFieldIter).second;
+  delete _BasicOperations;
+  delete _TransformOperations;
+  delete _3DPrimOperations;
+  delete _ShapesOperations;
+  delete _BlocksOperations;
+  delete _BooleanOperations;
+  delete _HealingOperations;
+  delete _CurvesOperations;
+  delete _LocalOperations;
+  delete _InsertOperations;
+  delete _MeasureOperations;
+  delete _GroupOperations;
+  delete _FieldOperations;
 }
 
 //=============================================================================
@@ -240,13 +201,9 @@ GEOMImpl_Gen::~GEOMImpl_Gen()
  * GetIBasicOperations
  */
 //=============================================================================
-GEOMImpl_IBasicOperations* GEOMImpl_Gen::GetIBasicOperations(int theDocID)
+GEOMImpl_IBasicOperations* GEOMImpl_Gen::GetIBasicOperations()
 {
-  if(_mapOfBasicOperations.find(theDocID) == _mapOfBasicOperations.end()) {
-    _mapOfBasicOperations[theDocID] = new GEOMImpl_IBasicOperations(this, theDocID);
-  }
-
-  return _mapOfBasicOperations[theDocID];
+  return _BasicOperations;
 }
 
 //=============================================================================
@@ -254,13 +211,9 @@ GEOMImpl_IBasicOperations* GEOMImpl_Gen::GetIBasicOperations(int theDocID)
  * GetITransformOperations
  */
 //=============================================================================
-GEOMImpl_ITransformOperations* GEOMImpl_Gen::GetITransformOperations(int theDocID)
+GEOMImpl_ITransformOperations* GEOMImpl_Gen::GetITransformOperations()
 {
-  if(_mapOfTransformOperations.find(theDocID) == _mapOfTransformOperations.end()) {
-    _mapOfTransformOperations[theDocID] = new GEOMImpl_ITransformOperations(this, theDocID);
-  }
-
-  return _mapOfTransformOperations[theDocID];
+  return _TransformOperations;
 }
 
 //=============================================================================
@@ -268,13 +221,9 @@ GEOMImpl_ITransformOperations* GEOMImpl_Gen::GetITransformOperations(int theDocI
  * GetIBooleanOperations
  */
 //=============================================================================
-GEOMImpl_IBooleanOperations* GEOMImpl_Gen::GetIBooleanOperations(int theDocID)
+GEOMImpl_IBooleanOperations* GEOMImpl_Gen::GetIBooleanOperations()
 {
-  if(_mapOfBooleanOperations.find(theDocID) == _mapOfBooleanOperations.end()) {
-    _mapOfBooleanOperations[theDocID] = new GEOMImpl_IBooleanOperations(this, theDocID);
-  }
-
-  return _mapOfBooleanOperations[theDocID];
+  return _BooleanOperations;
 }
 
 //=============================================================================
@@ -282,13 +231,9 @@ GEOMImpl_IBooleanOperations* GEOMImpl_Gen::GetIBooleanOperations(int theDocID)
  * GetIHealingOperations
  */
 //=============================================================================
-GEOMImpl_IHealingOperations* GEOMImpl_Gen::GetIHealingOperations(int theDocID)
+GEOMImpl_IHealingOperations* GEOMImpl_Gen::GetIHealingOperations()
 {
-  if(_mapOfHealingOperations.find(theDocID) == _mapOfHealingOperations.end()) {
-    _mapOfHealingOperations[theDocID] = new GEOMImpl_IHealingOperations(this, theDocID);
-  }
-
-  return _mapOfHealingOperations[theDocID];
+  return _HealingOperations;
 }
 
 //=============================================================================
@@ -296,13 +241,9 @@ GEOMImpl_IHealingOperations* GEOMImpl_Gen::GetIHealingOperations(int theDocID)
  * GetI3DPrimOperations
  */
 //=============================================================================
-GEOMImpl_I3DPrimOperations* GEOMImpl_Gen::GetI3DPrimOperations(int theDocID)
+GEOMImpl_I3DPrimOperations* GEOMImpl_Gen::GetI3DPrimOperations()
 {
-  if(_mapOf3DPrimOperations.find(theDocID) == _mapOf3DPrimOperations.end()) {
-    _mapOf3DPrimOperations[theDocID] = new GEOMImpl_I3DPrimOperations(this, theDocID);
-  }
-
-  return _mapOf3DPrimOperations[theDocID];
+  return _3DPrimOperations;
 }
 
 //=============================================================================
@@ -310,13 +251,9 @@ GEOMImpl_I3DPrimOperations* GEOMImpl_Gen::GetI3DPrimOperations(int theDocID)
  * GetIShapesOperations
  */
 //=============================================================================
-GEOMImpl_IShapesOperations* GEOMImpl_Gen::GetIShapesOperations(int theDocID)
+GEOMImpl_IShapesOperations* GEOMImpl_Gen::GetIShapesOperations()
 {
-  if(_mapOfShapesOperations.find(theDocID) == _mapOfShapesOperations.end()) {
-    _mapOfShapesOperations[theDocID] = new GEOMImpl_IShapesOperations(this, theDocID);
-  }
-
-  return _mapOfShapesOperations[theDocID];
+  return _ShapesOperations;
 }
 
 //=============================================================================
@@ -324,13 +261,9 @@ GEOMImpl_IShapesOperations* GEOMImpl_Gen::GetIShapesOperations(int theDocID)
  * GetIBlocksOperations
  */
 //=============================================================================
-GEOMImpl_IBlocksOperations* GEOMImpl_Gen::GetIBlocksOperations(int theDocID)
+GEOMImpl_IBlocksOperations* GEOMImpl_Gen::GetIBlocksOperations()
 {
-  if(_mapOfBlocksOperations.find(theDocID) == _mapOfBlocksOperations.end()) {
-    _mapOfBlocksOperations[theDocID] = new GEOMImpl_IBlocksOperations(this, theDocID);
-  }
-
-  return _mapOfBlocksOperations[theDocID];
+  return _BlocksOperations;
 }
 
 //=============================================================================
@@ -338,13 +271,9 @@ GEOMImpl_IBlocksOperations* GEOMImpl_Gen::GetIBlocksOperations(int theDocID)
  * GetICurvesOperations
  */
 //=============================================================================
-GEOMImpl_ICurvesOperations* GEOMImpl_Gen::GetICurvesOperations(int theDocID)
+GEOMImpl_ICurvesOperations* GEOMImpl_Gen::GetICurvesOperations()
 {
-  if(_mapOfCurvesOperations.find(theDocID) == _mapOfCurvesOperations.end()) {
-    _mapOfCurvesOperations[theDocID] = new GEOMImpl_ICurvesOperations(this, theDocID);
-  }
-
-  return _mapOfCurvesOperations[theDocID];
+  return _CurvesOperations;
 }
 
 //=============================================================================
@@ -352,13 +281,9 @@ GEOMImpl_ICurvesOperations* GEOMImpl_Gen::GetICurvesOperations(int theDocID)
  * GetILocalOperations
  */
 //=============================================================================
-GEOMImpl_ILocalOperations* GEOMImpl_Gen::GetILocalOperations(int theDocID)
+GEOMImpl_ILocalOperations* GEOMImpl_Gen::GetILocalOperations()
 {
-  if(_mapOfLocalOperations.find(theDocID) == _mapOfLocalOperations.end()) {
-    _mapOfLocalOperations[theDocID] = new GEOMImpl_ILocalOperations(this, theDocID);
-  }
-
-  return _mapOfLocalOperations[theDocID];
+  return _LocalOperations;
 }
 
 //=============================================================================
@@ -366,13 +291,9 @@ GEOMImpl_ILocalOperations* GEOMImpl_Gen::GetILocalOperations(int theDocID)
  * GetIInsertOperations
  */
 //=============================================================================
-GEOMImpl_IInsertOperations* GEOMImpl_Gen::GetIInsertOperations(int theDocID)
+GEOMImpl_IInsertOperations* GEOMImpl_Gen::GetIInsertOperations()
 {
-  if(_mapOfInsertOperations.find(theDocID) == _mapOfInsertOperations.end()) {
-    _mapOfInsertOperations[theDocID] = new GEOMImpl_IInsertOperations(this, theDocID);
-  }
-
-  return _mapOfInsertOperations[theDocID];
+  return _InsertOperations;
 }
 
 //=============================================================================
@@ -380,13 +301,9 @@ GEOMImpl_IInsertOperations* GEOMImpl_Gen::GetIInsertOperations(int theDocID)
  * GetIMeasureOperations
  */
 //=============================================================================
-GEOMImpl_IMeasureOperations* GEOMImpl_Gen::GetIMeasureOperations(int theDocID)
+GEOMImpl_IMeasureOperations* GEOMImpl_Gen::GetIMeasureOperations()
 {
-  if(_mapOfMeasureOperations.find(theDocID) == _mapOfMeasureOperations.end()) {
-    _mapOfMeasureOperations[theDocID] = new GEOMImpl_IMeasureOperations(this, theDocID);
-  }
-
-  return _mapOfMeasureOperations[theDocID];
+  return _MeasureOperations;
 }
 
 //=============================================================================
@@ -394,13 +311,9 @@ GEOMImpl_IMeasureOperations* GEOMImpl_Gen::GetIMeasureOperations(int theDocID)
  * GetIGroupOperations
  */
 //=============================================================================
-GEOMImpl_IGroupOperations* GEOMImpl_Gen::GetIGroupOperations(int theDocID)
+GEOMImpl_IGroupOperations* GEOMImpl_Gen::GetIGroupOperations()
 {
-  if(_mapOfGroupOperations.find(theDocID) == _mapOfGroupOperations.end()) {
-    _mapOfGroupOperations[theDocID] = new GEOMImpl_IGroupOperations(this, theDocID);
-  }
-
-  return _mapOfGroupOperations[theDocID];
+  return _GroupOperations;
 }
 
 //=============================================================================
@@ -408,11 +321,7 @@ GEOMImpl_IGroupOperations* GEOMImpl_Gen::GetIGroupOperations(int theDocID)
  * GetIFieldOperations
  */
 //=============================================================================
-GEOMImpl_IFieldOperations* GEOMImpl_Gen::GetIFieldOperations(int theDocID)
+GEOMImpl_IFieldOperations* GEOMImpl_Gen::GetIFieldOperations()
 {
-  if(_mapOfFieldOperations.find(theDocID) == _mapOfFieldOperations.end()) {
-    _mapOfFieldOperations[theDocID] = new GEOMImpl_IFieldOperations(this, theDocID);
-  }
-
-  return _mapOfFieldOperations[theDocID];
+  return _FieldOperations;
 }
index a6ba04777fe7dc78594589cc910a381bfbf09443..48b1463cc0774c8e2803df9a971bceee89b47d27 100644 (file)
@@ -48,47 +48,47 @@ class GEOMIMPL_EXPORT GEOMImpl_Gen : public GEOM_Engine
   GEOMImpl_Gen();
   ~GEOMImpl_Gen();
 
-  GEOMImpl_IBasicOperations* GetIBasicOperations(int theDocID);
+  GEOMImpl_IBasicOperations* GetIBasicOperations();
 
-  GEOMImpl_ITransformOperations* GetITransformOperations(int theDocID);
+  GEOMImpl_ITransformOperations* GetITransformOperations();
 
-  GEOMImpl_I3DPrimOperations* GetI3DPrimOperations(int theDocID);
+  GEOMImpl_I3DPrimOperations* GetI3DPrimOperations();
 
-  GEOMImpl_IShapesOperations* GetIShapesOperations(int theDocID);
+  GEOMImpl_IShapesOperations* GetIShapesOperations();
 
-  GEOMImpl_IBlocksOperations* GetIBlocksOperations(int theDocID);
+  GEOMImpl_IBlocksOperations* GetIBlocksOperations();
 
-  GEOMImpl_IMeasureOperations* GetIMeasureOperations(int theDocID);
+  GEOMImpl_IMeasureOperations* GetIMeasureOperations();
 
-  GEOMImpl_IBooleanOperations* GetIBooleanOperations(int theDocID);
+  GEOMImpl_IBooleanOperations* GetIBooleanOperations();
 
-  GEOMImpl_ICurvesOperations* GetICurvesOperations(int theDocID);
+  GEOMImpl_ICurvesOperations* GetICurvesOperations();
 
-  GEOMImpl_ILocalOperations* GetILocalOperations(int theDocID);
+  GEOMImpl_ILocalOperations* GetILocalOperations();
 
-  GEOMImpl_IInsertOperations* GetIInsertOperations(int theDocID);
+  GEOMImpl_IInsertOperations* GetIInsertOperations();
 
-  GEOMImpl_IHealingOperations* GetIHealingOperations(int theDocID);
+  GEOMImpl_IHealingOperations* GetIHealingOperations();
 
-  GEOMImpl_IGroupOperations* GetIGroupOperations(int theDocID);
+  GEOMImpl_IGroupOperations* GetIGroupOperations();
 
-  GEOMImpl_IFieldOperations* GetIFieldOperations(int theDocID);
+  GEOMImpl_IFieldOperations* GetIFieldOperations();
 
  private:
 
-  std::map <int, GEOMImpl_IBasicOperations*>     _mapOfBasicOperations;
-  std::map <int, GEOMImpl_ITransformOperations*> _mapOfTransformOperations;
-  std::map <int, GEOMImpl_I3DPrimOperations*>    _mapOf3DPrimOperations;
-  std::map <int, GEOMImpl_IShapesOperations*>    _mapOfShapesOperations;
-  std::map <int, GEOMImpl_IBlocksOperations*>    _mapOfBlocksOperations;
-  std::map <int, GEOMImpl_IBooleanOperations*>   _mapOfBooleanOperations;
-  std::map <int, GEOMImpl_IHealingOperations*>   _mapOfHealingOperations;
-  std::map <int, GEOMImpl_ICurvesOperations*>    _mapOfCurvesOperations;
-  std::map <int, GEOMImpl_ILocalOperations*>     _mapOfLocalOperations;
-  std::map <int, GEOMImpl_IInsertOperations*>    _mapOfInsertOperations;
-  std::map <int, GEOMImpl_IMeasureOperations*>   _mapOfMeasureOperations;
-  std::map <int, GEOMImpl_IGroupOperations*>     _mapOfGroupOperations;
-  std::map <int, GEOMImpl_IFieldOperations*>     _mapOfFieldOperations;
+  GEOMImpl_IBasicOperations*     _BasicOperations;
+  GEOMImpl_ITransformOperations* _TransformOperations;
+  GEOMImpl_I3DPrimOperations*    _3DPrimOperations;
+  GEOMImpl_IShapesOperations*    _ShapesOperations;
+  GEOMImpl_IBlocksOperations*    _BlocksOperations;
+  GEOMImpl_IBooleanOperations*   _BooleanOperations;
+  GEOMImpl_IHealingOperations*   _HealingOperations;
+  GEOMImpl_ICurvesOperations*    _CurvesOperations;
+  GEOMImpl_ILocalOperations*     _LocalOperations;
+  GEOMImpl_IInsertOperations*    _InsertOperations;
+  GEOMImpl_IMeasureOperations*   _MeasureOperations;
+  GEOMImpl_IGroupOperations*     _GroupOperations;
+  GEOMImpl_IFieldOperations*     _FieldOperations;
 };
 
 #endif
index ba87e9c4f2c3842a237c965a7ef18a3ff0dd75c1..c94446895bc2da23d6eb23880ad32ec42eee272c 100644 (file)
  *   constructor:
  */
 //=============================================================================
-GEOMImpl_I3DPrimOperations::GEOMImpl_I3DPrimOperations (GEOM_Engine* theEngine, int theDocID)
-: GEOM_IOperations(theEngine, theDocID)
+GEOMImpl_I3DPrimOperations::GEOMImpl_I3DPrimOperations (GEOM_Engine* theEngine)
+: GEOM_IOperations(theEngine)
 {
   MESSAGE("GEOMImpl_I3DPrimOperations::GEOMImpl_I3DPrimOperations");
-  myGroupOperations = new GEOMImpl_IGroupOperations(GetEngine(), GetDocID());
+  myGroupOperations = new GEOMImpl_IGroupOperations(GetEngine());
 }
 
 //=============================================================================
@@ -114,7 +114,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeBoxDXDYDZ (double theDX, dou
   SetErrorCode(KO);
 
   //Add a new Box object
-  Handle(GEOM_Object) aBox = GetEngine()->AddObject(GetDocID(), GEOM_BOX);
+  Handle(GEOM_Object) aBox = GetEngine()->AddObject(GEOM_BOX);
 
   //Add a new Box function with DX_DY_DZ parameters
   Handle(GEOM_Function) aFunction = aBox->AddFunction(GEOMImpl_BoxDriver::GetID(), BOX_DX_DY_DZ);
@@ -165,7 +165,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeBoxTwoPnt (Handle(GEOM_Objec
   if (thePnt1.IsNull() || thePnt2.IsNull()) return NULL;
 
   //Add a new Box object
-  Handle(GEOM_Object) aBox = GetEngine()->AddObject(GetDocID(), GEOM_BOX);
+  Handle(GEOM_Object) aBox = GetEngine()->AddObject(GEOM_BOX);
 
   //Add a new Box function for creation a box relatively to two points
   Handle(GEOM_Function) aFunction = aBox->AddFunction(GEOMImpl_BoxDriver::GetID(), BOX_TWO_PNT);
@@ -218,7 +218,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeFaceHW (double theH, double
   if (theH == 0 || theW == 0) return NULL;
 
   //Add a new Face object
-  Handle(GEOM_Object) aFace = GetEngine()->AddObject(GetDocID(), GEOM_FACE);
+  Handle(GEOM_Object) aFace = GetEngine()->AddObject(GEOM_FACE);
 
   //Add a new Box function for creation a box relatively to two points
   Handle(GEOM_Function) aFunction = aFace->AddFunction(GEOMImpl_FaceDriver::GetID(), FACE_H_W);
@@ -268,7 +268,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeFaceObjHW (Handle(GEOM_Objec
   if (theObj.IsNull()) return NULL;
 
   //Add a new Face object
-  Handle(GEOM_Object) aFace = GetEngine()->AddObject(GetDocID(), GEOM_FACE);
+  Handle(GEOM_Object) aFace = GetEngine()->AddObject(GEOM_FACE);
 
   //Add a new Box function for creation a box relatively to two points
   Handle(GEOM_Function) aFunction = aFace->AddFunction(GEOMImpl_FaceDriver::GetID(), FACE_OBJ_H_W);
@@ -323,7 +323,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeDiskPntVecR
   if (thePnt.IsNull() || theVec.IsNull()) return NULL;
 
   //Add a new Disk object
-  Handle(GEOM_Object) aDisk = GetEngine()->AddObject(GetDocID(), GEOM_FACE);
+  Handle(GEOM_Object) aDisk = GetEngine()->AddObject(GEOM_FACE);
 
   //Add a new Disk function for creation a disk relatively to point and vector
   Handle(GEOM_Function) aFunction =
@@ -380,7 +380,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeDiskThreePnt (Handle(GEOM_Ob
   if (thePnt1.IsNull() || thePnt2.IsNull() || thePnt3.IsNull()) return NULL;
 
   //Add a new Disk object
-  Handle(GEOM_Object) aDisk = GetEngine()->AddObject(GetDocID(), GEOM_FACE);
+  Handle(GEOM_Object) aDisk = GetEngine()->AddObject(GEOM_FACE);
 
   //Add a new Disk function for creation a disk relatively to three points
   Handle(GEOM_Function) aFunction =
@@ -436,7 +436,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeDiskR (double theR, int theO
   if (theR == 0 ) return NULL;
 
   //Add a new Disk object
-  Handle(GEOM_Object) aDisk = GetEngine()->AddObject(GetDocID(), GEOM_FACE);
+  Handle(GEOM_Object) aDisk = GetEngine()->AddObject(GEOM_FACE);
 
   //Add a new Box function for creation a box relatively to two points
   Handle(GEOM_Function) aFunction = aDisk->AddFunction(GEOMImpl_DiskDriver::GetID(), DISK_R);
@@ -482,7 +482,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeCylinderRH (double theR, dou
   SetErrorCode(KO);
 
   //Add a new Cylinder object
-  Handle(GEOM_Object) aCylinder = GetEngine()->AddObject(GetDocID(), GEOM_CYLINDER);
+  Handle(GEOM_Object) aCylinder = GetEngine()->AddObject(GEOM_CYLINDER);
 
   //Add a new Cylinder function with R and H parameters
   Handle(GEOM_Function) aFunction = aCylinder->AddFunction(GEOMImpl_CylinderDriver::GetID(), CYLINDER_R_H);
@@ -528,7 +528,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeCylinderRHA (double theR, do
   SetErrorCode(KO);
 
   //Add a new Cylinder object
-  Handle(GEOM_Object) aCylinder = GetEngine()->AddObject(GetDocID(), GEOM_CYLINDER);
+  Handle(GEOM_Object) aCylinder = GetEngine()->AddObject(GEOM_CYLINDER);
 
   //Add a new Cylinder function with R and H parameters
   Handle(GEOM_Function) aFunction = aCylinder->AddFunction(GEOMImpl_CylinderDriver::GetID(), CYLINDER_R_H_A);
@@ -579,7 +579,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeCylinderPntVecRH (Handle(GEO
   if (thePnt.IsNull() || theVec.IsNull()) return NULL;
 
   //Add a new Cylinder object
-  Handle(GEOM_Object) aCylinder = GetEngine()->AddObject(GetDocID(), GEOM_CYLINDER);
+  Handle(GEOM_Object) aCylinder = GetEngine()->AddObject(GEOM_CYLINDER);
 
   //Add a new Cylinder function for creation a cylinder relatively to point and vector
   Handle(GEOM_Function) aFunction =
@@ -637,7 +637,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeCylinderPntVecRHA (Handle(GE
   if (thePnt.IsNull() || theVec.IsNull()) return NULL;
 
   //Add a new Cylinder object
-  Handle(GEOM_Object) aCylinder = GetEngine()->AddObject(GetDocID(), GEOM_CYLINDER);
+  Handle(GEOM_Object) aCylinder = GetEngine()->AddObject(GEOM_CYLINDER);
 
   //Add a new Cylinder function for creation a cylinder relatively to point and vector
   Handle(GEOM_Function) aFunction =
@@ -694,7 +694,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeConeR1R2H (double theR1, dou
   SetErrorCode(KO);
 
   //Add a new Cone object
-  Handle(GEOM_Object) aCone = GetEngine()->AddObject(GetDocID(), GEOM_CONE);
+  Handle(GEOM_Object) aCone = GetEngine()->AddObject(GEOM_CONE);
 
   //Add a new Cone function with R and H parameters
   Handle(GEOM_Function) aFunction =
@@ -748,7 +748,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeConePntVecR1R2H (Handle(GEOM
   if (thePnt.IsNull() || theVec.IsNull()) return NULL;
 
   //Add a new Cone object
-  Handle(GEOM_Object) aCone = GetEngine()->AddObject(GetDocID(), GEOM_CONE);
+  Handle(GEOM_Object) aCone = GetEngine()->AddObject(GEOM_CONE);
 
   //Add a new Cone function for creation a cone relatively to point and vector
   Handle(GEOM_Function) aFunction =
@@ -804,7 +804,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeSphereR (double theR)
   SetErrorCode(KO);
 
   //Add a new Sphere object
-  Handle(GEOM_Object) aSphere = GetEngine()->AddObject(GetDocID(), GEOM_SPHERE);
+  Handle(GEOM_Object) aSphere = GetEngine()->AddObject(GEOM_SPHERE);
 
   //Add a new Sphere function with R parameter
   Handle(GEOM_Function) aFunction = aSphere->AddFunction(GEOMImpl_SphereDriver::GetID(), SPHERE_R);
@@ -852,7 +852,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeSpherePntR (Handle(GEOM_Obje
   if (thePnt.IsNull()) return NULL;
 
   //Add a new Point object
-  Handle(GEOM_Object) aSphere = GetEngine()->AddObject(GetDocID(), GEOM_SPHERE);
+  Handle(GEOM_Object) aSphere = GetEngine()->AddObject(GEOM_SPHERE);
 
   //Add a new Sphere function for creation a sphere relatively to point
   Handle(GEOM_Function) aFunction = aSphere->AddFunction(GEOMImpl_SphereDriver::GetID(), SPHERE_PNT_R);
@@ -904,7 +904,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeTorusRR
   SetErrorCode(KO);
 
   //Add a new Torus object
-  Handle(GEOM_Object) anEll = GetEngine()->AddObject(GetDocID(), GEOM_TORUS);
+  Handle(GEOM_Object) anEll = GetEngine()->AddObject(GEOM_TORUS);
 
   //Add a new Torus function
   Handle(GEOM_Function) aFunction =
@@ -955,7 +955,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeTorusPntVecRR
   if (thePnt.IsNull() || theVec.IsNull()) return NULL;
 
   //Add a new Torus object
-  Handle(GEOM_Object) anEll = GetEngine()->AddObject(GetDocID(), GEOM_TORUS);
+  Handle(GEOM_Object) anEll = GetEngine()->AddObject(GEOM_TORUS);
 
   //Add a new Torus function
   Handle(GEOM_Function) aFunction =
@@ -1014,7 +1014,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakePrismVecH (Handle(GEOM_Objec
   if (theBase.IsNull() || theVec.IsNull()) return NULL;
 
   //Add a new Prism object
-  Handle(GEOM_Object) aPrism = GetEngine()->AddObject(GetDocID(), GEOM_PRISM);
+  Handle(GEOM_Object) aPrism = GetEngine()->AddObject(GEOM_PRISM);
 
   //Add a new Prism function for creation a Prism relatively to vector
   Handle(GEOM_Function) aFunction =
@@ -1077,7 +1077,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakePrismVecH2Ways (Handle(GEOM_
   if (theBase.IsNull() || theVec.IsNull()) return NULL;
 
   //Add a new Prism object
-  Handle(GEOM_Object) aPrism = GetEngine()->AddObject(GetDocID(), GEOM_PRISM);
+  Handle(GEOM_Object) aPrism = GetEngine()->AddObject(GEOM_PRISM);
 
   //Add a new Prism function for creation a Prism relatively to vector
   Handle(GEOM_Function) aFunction =
@@ -1136,7 +1136,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakePrismTwoPnt
   if (theBase.IsNull() || thePoint1.IsNull() || thePoint2.IsNull()) return NULL;
 
   //Add a new Prism object
-  Handle(GEOM_Object) aPrism = GetEngine()->AddObject(GetDocID(), GEOM_PRISM);
+  Handle(GEOM_Object) aPrism = GetEngine()->AddObject(GEOM_PRISM);
 
   //Add a new Prism function for creation a Prism relatively to two points
   Handle(GEOM_Function) aFunction =
@@ -1200,7 +1200,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakePrismTwoPnt2Ways
   if (theBase.IsNull() || thePoint1.IsNull() || thePoint2.IsNull()) return NULL;
 
   //Add a new Prism object
-  Handle(GEOM_Object) aPrism = GetEngine()->AddObject(GetDocID(), GEOM_PRISM);
+  Handle(GEOM_Object) aPrism = GetEngine()->AddObject(GEOM_PRISM);
 
   //Add a new Prism function for creation a Prism relatively to two points
   Handle(GEOM_Function) aFunction =
@@ -1259,7 +1259,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakePrismDXDYDZ
   if (theBase.IsNull()) return NULL;
 
   //Add a new Prism object
-  Handle(GEOM_Object) aPrism = GetEngine()->AddObject(GetDocID(), GEOM_PRISM);
+  Handle(GEOM_Object) aPrism = GetEngine()->AddObject(GEOM_PRISM);
 
   //Add a new Prism function for creation a Prism by DXDYDZ
   Handle(GEOM_Function) aFunction =
@@ -1321,7 +1321,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakePrismDXDYDZ2Ways
   if (theBase.IsNull()) return NULL;
 
   //Add a new Prism object
-  Handle(GEOM_Object) aPrism = GetEngine()->AddObject(GetDocID(), GEOM_PRISM);
+  Handle(GEOM_Object) aPrism = GetEngine()->AddObject(GEOM_PRISM);
 
   //Add a new Prism function for creation a Prism by DXDYDZ
   Handle(GEOM_Function) aFunction =
@@ -1381,12 +1381,12 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeDraftPrism
   if ( theFuse )
   {
     //Add a new Extruded Boss object  
-    aPrism = GetEngine()->AddObject(GetDocID(), GEOM_EXTRUDED_BOSS);
+    aPrism = GetEngine()->AddObject(GEOM_EXTRUDED_BOSS);
   }
   else
   { 
     //Add a new Extruded Cut object  
-    aPrism = GetEngine()->AddObject(GetDocID(), GEOM_EXTRUDED_CUT);
+    aPrism = GetEngine()->AddObject(GEOM_EXTRUDED_CUT);
   }
   
   //Add a new Prism function for the creation of a Draft Prism feature
@@ -1464,7 +1464,7 @@ Handle(TColStd_HSequenceOfTransient) GEOMImpl_I3DPrimOperations::MakePipe
   if (theBase.IsNull() || thePath.IsNull()) return NULL;
 
   //Add a new Pipe object
-  Handle(GEOM_Object) aPipe = GetEngine()->AddObject(GetDocID(), GEOM_PIPE);
+  Handle(GEOM_Object) aPipe = GetEngine()->AddObject(GEOM_PIPE);
 
   //Add a new Pipe function
   Handle(GEOM_Function) aFunction =
@@ -1541,7 +1541,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeRevolutionAxisAngle (Handle(
   if (theBase.IsNull() || theAxis.IsNull()) return NULL;
 
   //Add a new Revolution object
-  Handle(GEOM_Object) aRevolution = GetEngine()->AddObject(GetDocID(), GEOM_REVOLUTION);
+  Handle(GEOM_Object) aRevolution = GetEngine()->AddObject(GEOM_REVOLUTION);
 
   //Add a new Revolution function for creation a revolution relatively to axis
   Handle(GEOM_Function) aFunction =
@@ -1597,7 +1597,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeRevolutionAxisAngle2Ways
   if (theBase.IsNull() || theAxis.IsNull()) return NULL;
 
   //Add a new Revolution object
-  Handle(GEOM_Object) aRevolution = GetEngine()->AddObject(GetDocID(), GEOM_REVOLUTION);
+  Handle(GEOM_Object) aRevolution = GetEngine()->AddObject(GEOM_REVOLUTION);
 
   //Add a new Revolution function for creation a revolution relatively to axis
   Handle(GEOM_Function) aFunction =
@@ -1659,7 +1659,7 @@ GEOMImpl_I3DPrimOperations::MakeFilling (std::list< Handle(GEOM_Object)> & theCo
     return NULL;
   }
   //Add a new Filling object
-  Handle(GEOM_Object) aFilling = GetEngine()->AddObject(GetDocID(), GEOM_FILLING);
+  Handle(GEOM_Object) aFilling = GetEngine()->AddObject(GEOM_FILLING);
 
   //Add a new Filling function for creation a filling  from a compound
   Handle(GEOM_Function) aFunction = aFilling->AddFunction(GEOMImpl_FillingDriver::GetID(), BASIC_FILLING);
@@ -1735,7 +1735,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeThruSections(
     return anObj;
 
   //Add a new ThruSections object
-  Handle(GEOM_Object) aThruSect = GetEngine()->AddObject(GetDocID(), GEOM_THRUSECTIONS);
+  Handle(GEOM_Object) aThruSect = GetEngine()->AddObject(GEOM_THRUSECTIONS);
 
 
   //Add a new ThruSections function
@@ -1840,7 +1840,7 @@ Handle(TColStd_HSequenceOfTransient)
 
   Standard_Integer nbLocs =  (theLocations.IsNull() ? 0 :theLocations->Length());
   //Add a new Pipe object
-  Handle(GEOM_Object) aPipeDS = GetEngine()->AddObject(GetDocID(), GEOM_PIPE);
+  Handle(GEOM_Object) aPipeDS = GetEngine()->AddObject(GEOM_PIPE);
 
   //Add a new Pipe function
 
@@ -2016,7 +2016,7 @@ Handle(TColStd_HSequenceOfTransient)
   Standard_Integer nbLocs =  (theLocations.IsNull() ? 0 :theLocations->Length());
 
   //Add a new Pipe object
-  Handle(GEOM_Object) aPipeDS = GetEngine()->AddObject(GetDocID(), GEOM_PIPE);
+  Handle(GEOM_Object) aPipeDS = GetEngine()->AddObject(GEOM_PIPE);
 
   //Add a new Pipe function
 
@@ -2205,7 +2205,7 @@ Handle(TColStd_HSequenceOfTransient)
   Standard_Integer nbLocs =  (theLocations.IsNull() ? 0 :theLocations->Length());
 
   //Add a new Pipe object
-  Handle(GEOM_Object) aPipeDS = GetEngine()->AddObject(GetDocID(), GEOM_PIPE);
+  Handle(GEOM_Object) aPipeDS = GetEngine()->AddObject(GEOM_PIPE);
 
   //Add a new Pipe function
 
@@ -2348,7 +2348,7 @@ Handle(TColStd_HSequenceOfTransient)
   if (theBase.IsNull() || thePath.IsNull() || theVec.IsNull()) return NULL;
 
   //Add a new Pipe object
-  Handle(GEOM_Object) aPipe = GetEngine()->AddObject(GetDocID(), GEOM_PIPE);
+  Handle(GEOM_Object) aPipe = GetEngine()->AddObject(GEOM_PIPE);
 
   //Add a new Pipe function
   Handle(GEOM_Function) aFunction =
@@ -2438,7 +2438,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::MakeThickening
   if (isCopy)
   { 
     //Add a new Copy object
-    aCopy = GetEngine()->AddObject(GetDocID(), theObject->GetType());
+    aCopy = GetEngine()->AddObject(theObject->GetType());
     aFunction = aCopy->AddFunction(GEOMImpl_OffsetDriver::GetID(), OFFSET_THICKENING_COPY);
   }
   else
@@ -2521,7 +2521,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::RestorePath (Handle(GEOM_Object)
   if (theShape.IsNull() || theBase1.IsNull() || theBase2.IsNull()) return NULL;
 
   // Add a new Path object
-  Handle(GEOM_Object) aPath = GetEngine()->AddObject(GetDocID(), GEOM_PIPE_PATH);
+  Handle(GEOM_Object) aPath = GetEngine()->AddObject(GEOM_PIPE_PATH);
 
   // Add a new Path function
   Handle(GEOM_Function) aFunction =
@@ -2586,7 +2586,7 @@ Handle(GEOM_Object) GEOMImpl_I3DPrimOperations::RestorePath
     return NULL;
 
   // Add a new Path object
-  Handle(GEOM_Object) aPath = GetEngine()->AddObject(GetDocID(), GEOM_PIPE_PATH);
+  Handle(GEOM_Object) aPath = GetEngine()->AddObject(GEOM_PIPE_PATH);
 
   // Add a new Path function
   Handle(GEOM_Function) aFunction =
index a65ac384a654fc5a6d8c7f9ae553198a257b2e28..7bf581c67caba3af8ce029b723f3ddb999ea25cd 100644 (file)
@@ -36,7 +36,7 @@ class GEOMImpl_IPipe;
 
 class GEOMImpl_I3DPrimOperations : public GEOM_IOperations {
  public:
-  Standard_EXPORT GEOMImpl_I3DPrimOperations(GEOM_Engine* theEngine, int theDocID);
+  Standard_EXPORT GEOMImpl_I3DPrimOperations(GEOM_Engine* theEngine);
   Standard_EXPORT ~GEOMImpl_I3DPrimOperations();
 
   Standard_EXPORT Handle(GEOM_Object) MakeBoxDXDYDZ (double theDX, double theDY, double theDZ);
index ce1f610685dde222dd40f63349ef246ea20933f5..25ceb6d3fd47bef8969f11722d0bb066867d0e90 100755 (executable)
@@ -39,12 +39,12 @@ typedef NCollection_DataMap< TCollection_ExtendedString, NCollection_List<TopoDS
  *  constructor
  */
 //=============================================================================
-GEOMImpl_IBaseIEOperations::GEOMImpl_IBaseIEOperations(GEOM_Engine* theEngine, int theDocID)
-: GEOM_IOperations(theEngine, theDocID)
+GEOMImpl_IBaseIEOperations::GEOMImpl_IBaseIEOperations(GEOM_Engine* theEngine)
+: GEOM_IOperations(theEngine)
 {
-  myGroupOperations = new GEOMImpl_IGroupOperations( GetEngine(), GetDocID() );
-  myFieldOperations = new GEOMImpl_IFieldOperations( GetEngine(), GetDocID() );
-  myShapesOperations = new GEOMImpl_IShapesOperations( GetEngine(), GetDocID() );
+  myGroupOperations = new GEOMImpl_IGroupOperations( GetEngine() );
+  myFieldOperations = new GEOMImpl_IFieldOperations( GetEngine() );
+  myShapesOperations = new GEOMImpl_IShapesOperations( GetEngine() );
 }
 
 //=============================================================================
index c891b5f7622c8b4846e4acfb81225fd058217b52..7f4c0700122cc8b74ac377ea75432c703b93a3c1 100644 (file)
@@ -33,7 +33,7 @@ class GEOMImpl_IShapesOperations;
 class GEOMImpl_IBaseIEOperations : public GEOM_IOperations
 {
 public:
-  Standard_EXPORT GEOMImpl_IBaseIEOperations(GEOM_Engine* theEngine, int theDocID);
+  Standard_EXPORT GEOMImpl_IBaseIEOperations(GEOM_Engine* theEngine);
   Standard_EXPORT ~GEOMImpl_IBaseIEOperations();
   
 protected:
index 1dc269f68a2929d93dc2b53e666c21664dbd5e7a..2ef18e0002320471e53a341335e24ee2fb6107f9 100644 (file)
@@ -59,8 +59,8 @@
  *   constructor:
  */
 //=============================================================================
-GEOMImpl_IBasicOperations::GEOMImpl_IBasicOperations(GEOM_Engine* theEngine, int theDocID)
-: GEOM_IOperations(theEngine, theDocID)
+GEOMImpl_IBasicOperations::GEOMImpl_IBasicOperations(GEOM_Engine* theEngine)
+: GEOM_IOperations(theEngine)
 {
   MESSAGE("GEOMImpl_IBasicOperations::GEOMImpl_IBasicOperations");
 }
@@ -87,7 +87,7 @@ Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakePointXYZ
   SetErrorCode(KO);
 
   //Add a new Point object
-  Handle(GEOM_Object) aPoint = GetEngine()->AddObject(GetDocID(), GEOM_POINT);
+  Handle(GEOM_Object) aPoint = GetEngine()->AddObject(GEOM_POINT);
 
   //Add a new Point function with XYZ parameters
   Handle(GEOM_Function) aFunction =
@@ -138,7 +138,7 @@ Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakePointWithReference
   if (theReference.IsNull()) return NULL;
 
   //Add a new Point object
-  Handle(GEOM_Object) aPoint = GetEngine()->AddObject(GetDocID(), GEOM_POINT);
+  Handle(GEOM_Object) aPoint = GetEngine()->AddObject(GEOM_POINT);
 
   //Add a new Point function for creation a point relativley another point
   Handle(GEOM_Function) aFunction = aPoint->AddFunction(GEOMImpl_PointDriver::GetID(), POINT_XYZ_REF);
@@ -197,7 +197,7 @@ Handle(GEOM_Object) GEOMImpl_IBasicOperations::makePointOnGeom
   if (theGeomObj.IsNull()) return NULL;
 
   //Add a new Point object
-  Handle(GEOM_Object) aPoint = GetEngine()->AddObject(GetDocID(), GEOM_POINT);
+  Handle(GEOM_Object) aPoint = GetEngine()->AddObject(GEOM_POINT);
 
   //Add a new Point function for creation a point relativley another point
   int fType = POINT_CURVE_PAR;
@@ -403,7 +403,7 @@ Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakePointOnLinesIntersection
   if (theLine1.IsNull() || theLine2.IsNull()) return NULL;
 
   //Add a new Point object
-  Handle(GEOM_Object) aPoint = GetEngine()->AddObject(GetDocID(), GEOM_POINT);
+  Handle(GEOM_Object) aPoint = GetEngine()->AddObject(GEOM_POINT);
 
   //Add a new Point function for creation a point relativley another point
   Handle(GEOM_Function) aFunction = aPoint->AddFunction(GEOMImpl_PointDriver::GetID(), POINT_LINES_INTERSECTION);
@@ -455,7 +455,7 @@ Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakeTangentOnCurve
   if (theCurve.IsNull()) return NULL;
 
   //Add a new Vector object
-  Handle(GEOM_Object) aVec = GetEngine()->AddObject(GetDocID(), GEOM_VECTOR);
+  Handle(GEOM_Object) aVec = GetEngine()->AddObject(GEOM_VECTOR);
 
   //Add a new Point function for creation a point relativley another point
   Handle(GEOM_Function) aFunction = aVec->AddFunction(GEOMImpl_VectorDriver::GetID(), VECTOR_TANGENT_CURVE_PAR);
@@ -504,7 +504,7 @@ Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakeVectorDXDYDZ
   SetErrorCode(KO);
 
   //Add a new Vector object
-  Handle(GEOM_Object) aVector = GetEngine()->AddObject(GetDocID(), GEOM_VECTOR);
+  Handle(GEOM_Object) aVector = GetEngine()->AddObject(GEOM_VECTOR);
 
   //Add a new Vector function with DXDYDZ parameters
   Handle(GEOM_Function) aFunction =
@@ -555,7 +555,7 @@ Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakeVectorTwoPnt
   if (thePnt1.IsNull() || thePnt2.IsNull()) return NULL;
 
   //Add a new Vector object
-  Handle(GEOM_Object) aVector = GetEngine()->AddObject(GetDocID(), GEOM_VECTOR);
+  Handle(GEOM_Object) aVector = GetEngine()->AddObject(GEOM_VECTOR);
 
   //Add a new Vector function
   Handle(GEOM_Function) aFunction =
@@ -609,7 +609,7 @@ Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakeLine
   if (thePnt.IsNull() || theDir.IsNull()) return NULL;
 
   //Add a new Line object
-  Handle(GEOM_Object) aLine = GetEngine()->AddObject(GetDocID(), GEOM_LINE);
+  Handle(GEOM_Object) aLine = GetEngine()->AddObject(GEOM_LINE);
 
   //Add a new Line function
   Handle(GEOM_Function) aFunction =
@@ -662,7 +662,7 @@ Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakeLineTwoPnt
   if (thePnt1.IsNull() || thePnt2.IsNull()) return NULL;
 
   //Add a new Line object
-  Handle(GEOM_Object) aLine = GetEngine()->AddObject(GetDocID(), GEOM_LINE);
+  Handle(GEOM_Object) aLine = GetEngine()->AddObject(GEOM_LINE);
 
   //Add a new Line function
   Handle(GEOM_Function) aFunction =
@@ -715,7 +715,7 @@ Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakeLineTwoFaces
   if (theFace1.IsNull() || theFace2.IsNull()) return NULL;
 
   //Add a new Line object
-  Handle(GEOM_Object) aLine = GetEngine()->AddObject(GetDocID(), GEOM_LINE);
+  Handle(GEOM_Object) aLine = GetEngine()->AddObject(GEOM_LINE);
 
   //Add a new Line function
   Handle(GEOM_Function) aFunction =
@@ -769,7 +769,7 @@ Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakePlaneThreePnt
   if (thePnt1.IsNull() || thePnt2.IsNull() || thePnt3.IsNull()) return NULL;
 
   //Add a new Plane object
-  Handle(GEOM_Object) aPlane = GetEngine()->AddObject(GetDocID(), GEOM_PLANE);
+  Handle(GEOM_Object) aPlane = GetEngine()->AddObject(GEOM_PLANE);
 
   //Add a new Plane function
   Handle(GEOM_Function) aFunction =
@@ -826,7 +826,7 @@ Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakePlanePntVec
   if (thePnt.IsNull() || theVec.IsNull()) return NULL;
 
   //Add a new Plane object
-  Handle(GEOM_Object) aPlane = GetEngine()->AddObject(GetDocID(), GEOM_PLANE);
+  Handle(GEOM_Object) aPlane = GetEngine()->AddObject(GEOM_PLANE);
 
   //Add a new Plane function
   Handle(GEOM_Function) aFunction =
@@ -880,7 +880,7 @@ Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakePlaneFace
   if (theFace.IsNull()) return NULL;
 
   //Add a new Plane object
-  Handle(GEOM_Object) aPlane = GetEngine()->AddObject(GetDocID(), GEOM_PLANE);
+  Handle(GEOM_Object) aPlane = GetEngine()->AddObject(GEOM_PLANE);
 
   //Add a new Plane function
   Handle(GEOM_Function) aFunction =
@@ -933,7 +933,7 @@ Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakePlane2Vec
   if (theVec1.IsNull() || theVec2.IsNull()) return NULL;
 
   //Add a new Plane object
-  Handle(GEOM_Object) aPlane = GetEngine()->AddObject(GetDocID(), GEOM_PLANE);
+  Handle(GEOM_Object) aPlane = GetEngine()->AddObject(GEOM_PLANE);
 
   //Add a new Plane function
   Handle(GEOM_Function) aFunction =
@@ -985,7 +985,7 @@ Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakePlaneLCS
   SetErrorCode(KO);
 
   //Add a new Plane object
-  Handle(GEOM_Object) aPlane = GetEngine()->AddObject(GetDocID(), GEOM_PLANE);
+  Handle(GEOM_Object) aPlane = GetEngine()->AddObject(GEOM_PLANE);
 
   //Add a new Plane function
   Handle(GEOM_Function) aFunction =
@@ -1040,7 +1040,7 @@ Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakeMarker
   SetErrorCode(KO);
 
   //Add a new Marker object
-  Handle(GEOM_Object) aMarker = GetEngine()->AddObject(GetDocID(), GEOM_MARKER);
+  Handle(GEOM_Object) aMarker = GetEngine()->AddObject(GEOM_MARKER);
 
   //Add a new Marker function
   Handle(GEOM_Function) aFunction =
@@ -1091,7 +1091,7 @@ Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakeMarkerFromShape
   SetErrorCode(KO);
 
   //Add a new Marker object
-  Handle(GEOM_Object) aMarker = GetEngine()->AddObject(GetDocID(), GEOM_MARKER);
+  Handle(GEOM_Object) aMarker = GetEngine()->AddObject(GEOM_MARKER);
 
   //Add a new Marker function
   Handle(GEOM_Function) aFunction =
@@ -1142,7 +1142,7 @@ Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakeMarkerPntTwoVec
   SetErrorCode(KO);
 
   //Add a new Marker object
-  Handle(GEOM_Object) aMarker = GetEngine()->AddObject(GetDocID(), GEOM_MARKER);
+  Handle(GEOM_Object) aMarker = GetEngine()->AddObject(GEOM_MARKER);
 
   //Add a new Marker function
   Handle(GEOM_Function) aFunction =
@@ -1201,7 +1201,7 @@ Handle(GEOM_Object) GEOMImpl_IBasicOperations::MakeTangentPlaneOnFace(const Hand
   if (theFace.IsNull()) return NULL;
 
   //Add a new Plane object
-  Handle(GEOM_Object) aPlane = GetEngine()->AddObject(GetDocID(), GEOM_PLANE);
+  Handle(GEOM_Object) aPlane = GetEngine()->AddObject(GEOM_PLANE);
 
   //Add a new Plane function
   Handle(GEOM_Function) aFunction =
index d19f875ef744280a762dc720001ab7a31149bfef..89329c61eee0c46aad5f154b46fd50c39b7be4d8 100644 (file)
@@ -31,7 +31,7 @@
 
 class GEOMImpl_IBasicOperations : public GEOM_IOperations {
  public:
-  Standard_EXPORT GEOMImpl_IBasicOperations(GEOM_Engine* theEngine, int theDocID);
+  Standard_EXPORT GEOMImpl_IBasicOperations(GEOM_Engine* theEngine);
   Standard_EXPORT ~GEOMImpl_IBasicOperations();
 
   // Point
index db35fe4a489a5cfcca33657da1776e1a651ca14c..7e0e24994b1f046459b0971c713c12981f9a7b10 100644 (file)
@@ -249,8 +249,8 @@ static Standard_Boolean IsQuadrangle(const TopoDS_Face   &theFace,
  *   constructor:
  */
 //=============================================================================
-GEOMImpl_IBlocksOperations::GEOMImpl_IBlocksOperations (GEOM_Engine* theEngine, int theDocID)
-: GEOM_IOperations(theEngine, theDocID)
+GEOMImpl_IBlocksOperations::GEOMImpl_IBlocksOperations (GEOM_Engine* theEngine)
+: GEOM_IOperations(theEngine)
 {
   MESSAGE("GEOMImpl_IBlocksOperations::GEOMImpl_IBlocksOperations");
 }
@@ -281,7 +281,7 @@ Handle(GEOM_Object) GEOMImpl_IBlocksOperations::MakeQuad
       theEdge3.IsNull() || theEdge4.IsNull()) return NULL;
 
   //Add a new Face object
-  Handle(GEOM_Object) aFace = GetEngine()->AddObject(GetDocID(), GEOM_FACE);
+  Handle(GEOM_Object) aFace = GetEngine()->AddObject(GEOM_FACE);
 
   //Add a new Face function
   Handle(GEOM_Function) aFunction =
@@ -342,7 +342,7 @@ Handle(GEOM_Object) GEOMImpl_IBlocksOperations::MakeQuad2Edges
   if (theEdge1.IsNull() || theEdge2.IsNull()) return NULL;
 
   //Add a new Face object
-  Handle(GEOM_Object) aFace = GetEngine()->AddObject(GetDocID(), GEOM_FACE);
+  Handle(GEOM_Object) aFace = GetEngine()->AddObject(GEOM_FACE);
 
   //Add a new Face function
   Handle(GEOM_Function) aFunction =
@@ -400,7 +400,7 @@ Handle(GEOM_Object) GEOMImpl_IBlocksOperations::MakeQuad4Vertices
       thePnt3.IsNull() || thePnt4.IsNull()) return NULL;
 
   //Add a new Face object
-  Handle(GEOM_Object) aFace = GetEngine()->AddObject(GetDocID(), GEOM_FACE);
+  Handle(GEOM_Object) aFace = GetEngine()->AddObject(GEOM_FACE);
 
   //Add a new Face function
   Handle(GEOM_Function) aFunction =
@@ -465,7 +465,7 @@ Handle(GEOM_Object) GEOMImpl_IBlocksOperations::MakeHexa
       theFace5.IsNull() || theFace6.IsNull()) return NULL;
 
   //Add a new Solid object
-  Handle(GEOM_Object) aBlock = GetEngine()->AddObject(GetDocID(), GEOM_BLOCK);
+  Handle(GEOM_Object) aBlock = GetEngine()->AddObject(GEOM_BLOCK);
 
   //Add a new Block function
   Handle(GEOM_Function) aFunction =
@@ -532,7 +532,7 @@ Handle(GEOM_Object) GEOMImpl_IBlocksOperations::MakeHexa2Faces
   if (theFace1.IsNull() || theFace2.IsNull()) return NULL;
 
   //Add a new Solid object
-  Handle(GEOM_Object) aBlock = GetEngine()->AddObject(GetDocID(), GEOM_BLOCK);
+  Handle(GEOM_Object) aBlock = GetEngine()->AddObject(GEOM_BLOCK);
 
   //Add a new Block function
   Handle(GEOM_Function) aFunction =
@@ -588,7 +588,7 @@ Handle(GEOM_Object) GEOMImpl_IBlocksOperations::MakeBlockCompound
   if (theCompound.IsNull()) return NULL;
 
   //Add a new object
-  Handle(GEOM_Object) aBlockComp = GetEngine()->AddObject(GetDocID(), GEOM_COMPOUND);
+  Handle(GEOM_Object) aBlockComp = GetEngine()->AddObject(GEOM_COMPOUND);
 
   //Add a new BlocksComp function
   Handle(GEOM_Function) aFunction =
@@ -2430,7 +2430,7 @@ Handle(GEOM_Object) GEOMImpl_IBlocksOperations::RemoveExtraEdges
   if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be fixed
 
   //Add a new Copy object
-  Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), GEOM_COPY);
+  Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GEOM_COPY);
 
   //Add a function
   Handle(GEOM_Function) aFunction =
@@ -2482,7 +2482,7 @@ Handle(GEOM_Object) GEOMImpl_IBlocksOperations::UnionFaces
   if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be fixed
 
   //Add a new Copy object
-  Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), GEOM_COPY);
+  Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GEOM_COPY);
 
   //Add a function
   Handle(GEOM_Function) aFunction =
@@ -2532,7 +2532,7 @@ Handle(GEOM_Object) GEOMImpl_IBlocksOperations::CheckAndImprove
   if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be fixed
 
   //Add a new Copy object
-  Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), GEOM_COPY);
+  Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GEOM_COPY);
 
   //Add a function
   Handle(GEOM_Function) aFunction =
@@ -3091,7 +3091,7 @@ Handle(GEOM_Object) GEOMImpl_IBlocksOperations::MakeMultiTransformation1D
   if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be moved
 
   //Add a new Copy object
-  Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), GEOM_COPY);
+  Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GEOM_COPY);
 
   //Add a translate function
   Handle(GEOM_Function) aFunction =
@@ -3150,7 +3150,7 @@ Handle(GEOM_Object) GEOMImpl_IBlocksOperations::MakeMultiTransformation2D
   if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be moved
 
   //Add a new Copy object
-  Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), GEOM_COPY);
+  Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GEOM_COPY);
 
   //Add a translate function
   Handle(GEOM_Function) aFunction =
index 37d69f74e714ab3d4967a7581e1749795caa7fa1..a11a4a311782a26b74a36e1ef5579832bd4d59b8 100644 (file)
@@ -36,7 +36,7 @@ class GEOM_Object;
 
 class GEOMImpl_IBlocksOperations : public GEOM_IOperations {
  public:
-  Standard_EXPORT GEOMImpl_IBlocksOperations(GEOM_Engine* theEngine, int theDocID);
+  Standard_EXPORT GEOMImpl_IBlocksOperations(GEOM_Engine* theEngine);
   Standard_EXPORT ~GEOMImpl_IBlocksOperations();
 
   // Creation of blocks and block faces
index 19812c2573314aefd3e6fff4a0791fd4070c4868..3c86c5fb8512ae2378d9cc79efa606148bc10a69 100644 (file)
@@ -49,8 +49,8 @@
  *   constructor:
  */
 //=============================================================================
-GEOMImpl_IBooleanOperations::GEOMImpl_IBooleanOperations (GEOM_Engine* theEngine, int theDocID)
-: GEOM_IOperations(theEngine, theDocID)
+GEOMImpl_IBooleanOperations::GEOMImpl_IBooleanOperations (GEOM_Engine* theEngine)
+: GEOM_IOperations(theEngine)
 {
   MESSAGE("GEOMImpl_IBooleanOperations::GEOMImpl_IBooleanOperations");
 }
@@ -82,7 +82,7 @@ Handle(GEOM_Object) GEOMImpl_IBooleanOperations::MakeBoolean
   if (theShape1.IsNull() || theShape2.IsNull()) return NULL;
 
   //Add a new Boolean object
-  Handle(GEOM_Object) aBool = GetEngine()->AddObject(GetDocID(), GEOM_BOOLEAN);
+  Handle(GEOM_Object) aBool = GetEngine()->AddObject(GEOM_BOOLEAN);
 
   //Add a new Boolean function
   Handle(GEOM_Function) aFunction;
@@ -162,7 +162,7 @@ Handle(GEOM_Object) GEOMImpl_IBooleanOperations::MakeFuse
   if (theShape1.IsNull() || theShape2.IsNull()) return NULL;
 
   //Add a new Boolean object
-  Handle(GEOM_Object) aBool = GetEngine()->AddObject(GetDocID(), GEOM_BOOLEAN);
+  Handle(GEOM_Object) aBool = GetEngine()->AddObject(GEOM_BOOLEAN);
 
   //Add a new Boolean function
   Handle(GEOM_Function) aFunction =
@@ -225,7 +225,7 @@ Handle(GEOM_Object) GEOMImpl_IBooleanOperations::MakeFuseList
   if (theShapes.IsNull()) return NULL;
 
   //Add a new Boolean object
-  Handle(GEOM_Object) aBool = GetEngine()->AddObject(GetDocID(), GEOM_BOOLEAN);
+  Handle(GEOM_Object) aBool = GetEngine()->AddObject(GEOM_BOOLEAN);
 
   //Add a new Boolean function
   Handle(GEOM_Function) aFunction =
@@ -286,7 +286,7 @@ Handle(GEOM_Object) GEOMImpl_IBooleanOperations::MakeCommonList
   if (theShapes.IsNull()) return NULL;
 
   //Add a new Boolean object
-  Handle(GEOM_Object) aBool = GetEngine()->AddObject(GetDocID(), GEOM_BOOLEAN);
+  Handle(GEOM_Object) aBool = GetEngine()->AddObject(GEOM_BOOLEAN);
 
   //Add a new Boolean function
   Handle(GEOM_Function) aFunction =
@@ -353,7 +353,7 @@ Handle(GEOM_Object) GEOMImpl_IBooleanOperations::MakeCutList
   if (theShapes.IsNull()) return NULL;
 
   //Add a new Boolean object
-  Handle(GEOM_Object) aBool = GetEngine()->AddObject(GetDocID(), GEOM_BOOLEAN);
+  Handle(GEOM_Object) aBool = GetEngine()->AddObject(GEOM_BOOLEAN);
 
   //Add a new Boolean function
   Handle(GEOM_Function) aFunction =
@@ -429,7 +429,7 @@ Handle(GEOM_Object) GEOMImpl_IBooleanOperations::MakePartition
   SetErrorCode(KO);
 
   //Add a new Partition object
-  Handle(GEOM_Object) aPartition = GetEngine()->AddObject(GetDocID(), GEOM_PARTITION);
+  Handle(GEOM_Object) aPartition = GetEngine()->AddObject(GEOM_PARTITION);
 
   //Add a new Partition function
   Handle(GEOM_Function) aFunction;
@@ -565,7 +565,7 @@ Handle(GEOM_Object) GEOMImpl_IBooleanOperations::MakeHalfPartition
   if (theShape.IsNull() || thePlane.IsNull()) return NULL;
 
   //Add a new Boolean object
-  Handle(GEOM_Object) aPart = GetEngine()->AddObject(GetDocID(), GEOM_PARTITION);
+  Handle(GEOM_Object) aPart = GetEngine()->AddObject(GEOM_PARTITION);
 
   //Add a new Partition function
   Handle(GEOM_Function) aFunction =
index af3e46d3bb6e1f3d6e7804da88010f2e41fa99a1..602f0132fd5c438d937133d4e7993e52445854cd 100644 (file)
@@ -33,7 +33,7 @@ class GEOM_Object;
 
 class GEOMImpl_IBooleanOperations : public GEOM_IOperations {
  public:
-  Standard_EXPORT GEOMImpl_IBooleanOperations(GEOM_Engine* theEngine, int theDocID);
+  Standard_EXPORT GEOMImpl_IBooleanOperations(GEOM_Engine* theEngine);
   Standard_EXPORT ~GEOMImpl_IBooleanOperations();
 
   Standard_EXPORT Handle(GEOM_Object) MakeBoolean
index 3d9bf31ad48017dae06e63e66af334e33f1404cc..1e7bc9f8e8e9525f58a905b353bef1c7af1eaa44 100644 (file)
@@ -183,8 +183,8 @@ namespace
  *   constructor:
  */
 //=============================================================================
-GEOMImpl_ICurvesOperations::GEOMImpl_ICurvesOperations (GEOM_Engine* theEngine, int theDocID)
-: GEOM_IOperations(theEngine, theDocID)
+GEOMImpl_ICurvesOperations::GEOMImpl_ICurvesOperations (GEOM_Engine* theEngine)
+: GEOM_IOperations(theEngine)
 {
   MESSAGE("GEOMImpl_ICurvesOperations::GEOMImpl_ICurvesOperations");
 }
@@ -214,7 +214,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeCircleThreePnt (Handle(GEOM_
   if (thePnt1.IsNull() || thePnt2.IsNull() || thePnt3.IsNull()) return NULL;
 
   //Add a new Circle object
-  Handle(GEOM_Object) aCircle = GetEngine()->AddObject(GetDocID(), GEOM_CIRCLE);
+  Handle(GEOM_Object) aCircle = GetEngine()->AddObject(GEOM_CIRCLE);
 
   //Add a new Circle function for creation a circle relatively to three points
   Handle(GEOM_Function) aFunction =
@@ -272,7 +272,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeCircleCenter2Pnt (Handle(GEO
   if (thePnt1.IsNull() || thePnt2.IsNull() || thePnt3.IsNull()) return NULL;
 
   //Add a new Circle object
-  Handle(GEOM_Object) aCircle = GetEngine()->AddObject(GetDocID(), GEOM_CIRCLE);
+  Handle(GEOM_Object) aCircle = GetEngine()->AddObject(GEOM_CIRCLE);
 
   //Add a new Circle function for creation a circle relatively to center and 2 points
   Handle(GEOM_Function) aFunction =
@@ -331,7 +331,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeCirclePntVecR
   //if (thePnt.IsNull() || theVec.IsNull()) return NULL;
 
   //Add a new Circle object
-  Handle(GEOM_Object) aCircle = GetEngine()->AddObject(GetDocID(), GEOM_CIRCLE);
+  Handle(GEOM_Object) aCircle = GetEngine()->AddObject(GEOM_CIRCLE);
 
   //Add a new Circle function for creation a circle relatively to point and vector
   Handle(GEOM_Function) aFunction =
@@ -397,7 +397,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeEllipse
   //if (thePnt.IsNull() || theVec.IsNull()) return NULL;
 
   //Add a new Ellipse object
-  Handle(GEOM_Object) anEll = GetEngine()->AddObject(GetDocID(), GEOM_ELLIPSE);
+  Handle(GEOM_Object) anEll = GetEngine()->AddObject(GEOM_ELLIPSE);
 
   //Add a new Ellipse function
   Handle(GEOM_Function) aFunction =
@@ -473,7 +473,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeArc (Handle(GEOM_Object) the
   if (thePnt1.IsNull() || thePnt2.IsNull() || thePnt3.IsNull()) return NULL;
 
   //Add a new Circle Arc object
-  Handle(GEOM_Object) anArc = GetEngine()->AddObject(GetDocID(), GEOM_CIRC_ARC);
+  Handle(GEOM_Object) anArc = GetEngine()->AddObject(GEOM_CIRC_ARC);
 
   //Add a new Circle Arc function
   Handle(GEOM_Function) aFunction =
@@ -531,7 +531,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeArcCenter (Handle(GEOM_Objec
   if (thePnt1.IsNull() || thePnt2.IsNull() || thePnt3.IsNull()) return NULL;
 
   //Add a new Circle Arc object
-  Handle(GEOM_Object) anArc = GetEngine()->AddObject(GetDocID(), GEOM_CIRC_ARC);
+  Handle(GEOM_Object) anArc = GetEngine()->AddObject(GEOM_CIRC_ARC);
 
   //Add a new Circle Arc function
   Handle(GEOM_Function) aFunction =
@@ -589,7 +589,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeArcOfEllipse (Handle(GEOM_Ob
   if (thePnt1.IsNull() || thePnt2.IsNull() || thePnt3.IsNull()) return NULL;
 
   //Add a new Circle Arc object
-  Handle(GEOM_Object) anArc = GetEngine()->AddObject(GetDocID(), GEOM_ELLIPSE_ARC);
+  Handle(GEOM_Object) anArc = GetEngine()->AddObject(GEOM_ELLIPSE_ARC);
 
   //Add a new Circle Arc function
   Handle(GEOM_Function) aFunction =
@@ -644,7 +644,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakePolyline (std::list<Handle(G
   SetErrorCode(KO);
 
   //Add a new Polyline object
-  Handle(GEOM_Object) aPolyline = GetEngine()->AddObject(GetDocID(), GEOM_POLYLINE);
+  Handle(GEOM_Object) aPolyline = GetEngine()->AddObject(GEOM_POLYLINE);
 
   //Add a new Polyline function for creation a polyline relatively to points set
   Handle(GEOM_Function) aFunction =
@@ -714,7 +714,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeSplineBezier
   SetErrorCode(KO);
 
   //Add a new Spline object
-  Handle(GEOM_Object) aSpline = GetEngine()->AddObject(GetDocID(), GEOM_SPLINE);
+  Handle(GEOM_Object) aSpline = GetEngine()->AddObject(GEOM_SPLINE);
 
   //Add a new Spline function for creation a bezier curve relatively to points set
   Handle(GEOM_Function) aFunction =
@@ -784,7 +784,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeSplineInterpolation
   SetErrorCode(KO);
 
   //Add a new Spline object
-  Handle(GEOM_Object) aSpline = GetEngine()->AddObject(GetDocID(), GEOM_SPLINE);
+  Handle(GEOM_Object) aSpline = GetEngine()->AddObject(GEOM_SPLINE);
 
   //Add a new Spline function for interpolation type
   Handle(GEOM_Function) aFunction =
@@ -855,7 +855,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeSplineInterpolWithTangents
   SetErrorCode(KO);
 
   //Add a new Spline object
-  Handle(GEOM_Object) aSpline = GetEngine()->AddObject(GetDocID(), GEOM_SPLINE);
+  Handle(GEOM_Object) aSpline = GetEngine()->AddObject(GEOM_SPLINE);
 
   //Add a new Spline function for interpolation type
   Handle(GEOM_Function) aFunction =
@@ -1069,7 +1069,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeCurveParametric
   switch(theCurveType) {
   case Polyline: {
     //Add a new Polyline object
-    aCurve = GetEngine()->AddObject(GetDocID(), GEOM_POLYLINE);
+    aCurve = GetEngine()->AddObject(GEOM_POLYLINE);
 
     //Add a new Polyline function for creation a polyline relatively to points set
     aFunction = aCurve->AddFunction(GEOMImpl_PolylineDriver::GetID(), POLYLINE_POINTS);
@@ -1089,7 +1089,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeCurveParametric
   }
   case Bezier: {
     //Add a new Spline object
-    aCurve = GetEngine()->AddObject(GetDocID(), GEOM_SPLINE);
+    aCurve = GetEngine()->AddObject(GEOM_SPLINE);
     //Add a new Spline function for creation a bezier curve relatively to points set
     aFunction =
       aCurve->AddFunction(GEOMImpl_SplineDriver::GetID(), SPLINE_BEZIER);
@@ -1108,7 +1108,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeCurveParametric
   }
   case Interpolation: {
     //Add a new Spline object
-    aCurve = GetEngine()->AddObject(GetDocID(), GEOM_SPLINE);
+    aCurve = GetEngine()->AddObject(GEOM_SPLINE);
 
     //Add a new Spline function for creation a bezier curve relatively to points set
     aFunction = aCurve->AddFunction(GEOMImpl_SplineDriver::GetID(), SPLINE_INTERPOLATION);
@@ -1185,7 +1185,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeSketcher (const char* theCom
   if (!theCommand || strcmp(theCommand, "") == 0) return NULL;
 
   //Add a new Sketcher object
-  Handle(GEOM_Object) aSketcher = GetEngine()->AddObject(GetDocID(), GEOM_SKETCHER);
+  Handle(GEOM_Object) aSketcher = GetEngine()->AddObject(GEOM_SKETCHER);
 
   //Add a new Sketcher function
   Handle(GEOM_Function) aFunction =
@@ -1248,7 +1248,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeSketcherOnPlane
   if (!theCommand || strcmp(theCommand, "") == 0) return NULL;
 
   //Add a new Sketcher object
-  Handle(GEOM_Object) aSketcher = GetEngine()->AddObject(GetDocID(), GEOM_SKETCHER);
+  Handle(GEOM_Object) aSketcher = GetEngine()->AddObject(GEOM_SKETCHER);
 
   //Add a new Sketcher function
   Handle(GEOM_Function) aFunction =
@@ -1301,7 +1301,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::Make3DSketcherCommand (const cha
   if (!theCommand || strcmp(theCommand, "") == 0) return NULL;
 
   //Add a new Sketcher object
-  Handle(GEOM_Object) aSketcher = GetEngine()->AddObject(GetDocID(), GEOM_3DSKETCHER);
+  Handle(GEOM_Object) aSketcher = GetEngine()->AddObject(GEOM_3DSKETCHER);
 
   //Add a new Sketcher function
   Handle(GEOM_Function) aFunction =
@@ -1348,7 +1348,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::Make3DSketcher (std::list<double
   SetErrorCode(KO);
 
   //Add a new Sketcher object
-  Handle(GEOM_Object) a3DSketcher = GetEngine()->AddObject(GetDocID(), GEOM_3DSKETCHER);
+  Handle(GEOM_Object) a3DSketcher = GetEngine()->AddObject(GEOM_3DSKETCHER);
 
   //Add a new Sketcher function
   Handle(GEOM_Function) aFunction =
@@ -1421,7 +1421,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakeIsoline
 
   //Add a new Spline object
   Handle(GEOM_Object) anIsoline =
-    GetEngine()->AddObject(GetDocID(), GEOM_ISOLINE);
+    GetEngine()->AddObject(GEOM_ISOLINE);
 
   //Add a new Spline function for interpolation type
   Handle(GEOM_Function) aFunction =
@@ -1490,7 +1490,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakePolyline2D
 
   // Add a new Polyline object
   Handle(GEOM_Object)   aResult   =
-    GetEngine()->AddObject(GetDocID(), GEOM_POLYLINE2D);
+    GetEngine()->AddObject(GEOM_POLYLINE2D);
   Handle(GEOM_Function) aFunction = aResult->AddFunction
     (GEOMImpl_PolylineDriver::GetID(), POLYLINE2D_PLN_COORDS);
 
@@ -1563,7 +1563,7 @@ Handle(GEOM_Object) GEOMImpl_ICurvesOperations::MakePolyline2DOnPlane
 
   //Add a new Polyline object
   Handle(GEOM_Object) aResult =
-    GetEngine()->AddObject(GetDocID(), GEOM_POLYLINE2D);
+    GetEngine()->AddObject(GEOM_POLYLINE2D);
   Handle(GEOM_Function) aFunction = aResult->AddFunction
     (GEOMImpl_PolylineDriver::GetID(), POLYLINE2D_PLN_OBJECT);
 
index 2eb9459aaac56c10d6a6dbb95b28fbecd0756094..2d7c58fe10b8b686f7d25e44336be978ac957a6c 100644 (file)
@@ -38,7 +38,7 @@ class GEOMImpl_ICurvesOperations : public GEOM_IOperations {
 
   enum CurveType { Polyline, Bezier, Interpolation };
 
-  Standard_EXPORT GEOMImpl_ICurvesOperations(GEOM_Engine* theEngine, int theDocID);
+  Standard_EXPORT GEOMImpl_ICurvesOperations(GEOM_Engine* theEngine);
   Standard_EXPORT ~GEOMImpl_ICurvesOperations();
 
   Standard_EXPORT Handle(GEOM_Object) MakeCircleThreePnt (Handle(GEOM_Object) thePnt1,
index 77575f7e195d6a9db044cc5a003c3db2169d4ea3..6fccfba52e56f7b90058f076c8af62dc42beee83 100755 (executable)
@@ -56,8 +56,7 @@ GEOMImpl_Gen* GEOMImpl_IECallBack::GetEngine()
  *  Export
  */
 //=============================================================================
-bool GEOMImpl_IECallBack::Export( int                            /*theDocId*/,
-                                 const Handle(GEOM_Object)      /*theOriginal*/,
+bool GEOMImpl_IECallBack::Export( const Handle(GEOM_Object)      /*theOriginal*/,
                                   const TCollection_AsciiString& /*theFileName*/,
                                   const TCollection_AsciiString& /*theFormatName*/ )
 {
@@ -70,8 +69,7 @@ bool GEOMImpl_IECallBack::Export( int                            /*theDocId*/,
  */
 //=============================================================================
 Handle(TColStd_HSequenceOfTransient)
-GEOMImpl_IECallBack::Import( int                            /*theDocId*/,
-                            const TCollection_AsciiString& /*theFormatName*/,
+GEOMImpl_IECallBack::Import( const TCollection_AsciiString& /*theFormatName*/,
                              const TCollection_AsciiString& /*theFileName*/ )
 {
   return NULL;
@@ -83,8 +81,7 @@ GEOMImpl_IECallBack::Import( int                            /*theDocId*/,
  */
 //=============================================================================
 TCollection_AsciiString
-GEOMImpl_IECallBack::ReadValue( int                            /*theDocId*/,
-                               const TCollection_AsciiString& /*theFileName*/,
+GEOMImpl_IECallBack::ReadValue( const TCollection_AsciiString& /*theFileName*/,
                                 const TCollection_AsciiString& /*theFormatName*/,
                                 const TCollection_AsciiString& /*theParameterName*/ )
 {
index ef7a7d06d55ae0043306d1475a2c1d6d8cf6b72d..6373aa6002da909cd741e8ce3e07f129456e8feb 100644 (file)
@@ -37,21 +37,18 @@ class GEOMImpl_IECallBack
   Standard_EXPORT GEOMImpl_IECallBack();
   Standard_EXPORT ~GEOMImpl_IECallBack();
   
-  Standard_EXPORT virtual bool Export( int                            theDocId,
-                                      const Handle(GEOM_Object)      theOriginal,
+  Standard_EXPORT virtual bool Export( const Handle(GEOM_Object)      theOriginal,
                                        const TCollection_AsciiString& theFileName,
                                        const TCollection_AsciiString& theFormatName );
 
   Standard_EXPORT virtual
-  Handle(TColStd_HSequenceOfTransient) Import( int                            theDocId,
-                                              const TCollection_AsciiString& theFormatName,
-                                              const TCollection_AsciiString& theFileName );
+  Handle(TColStd_HSequenceOfTransient) Import( const TCollection_AsciiString& theFormatName,
+                                                                  const TCollection_AsciiString& theFileName );
 
   Standard_EXPORT virtual
-  TCollection_AsciiString  ReadValue( int                            theDocId,
-                                     const TCollection_AsciiString& theFileName,
-                                     const TCollection_AsciiString& theFormatName,
-                                     const TCollection_AsciiString& theParameterName );
+  TCollection_AsciiString  ReadValue( const TCollection_AsciiString& theFileName,
+                                                     const TCollection_AsciiString& theFormatName,
+                                                     const TCollection_AsciiString& theParameterName );
 
   Standard_EXPORT static void Register( const TCollection_AsciiString& theFormatName, GEOMImpl_IECallBack* theCallBack );
 
index c0b219e2951429c1b7860505db6332a6004595b6..f6ad9f49340d468e0e822342f687220a51a58abd 100644 (file)
@@ -39,8 +39,8 @@
  *   constructor:
  */
 //=============================================================================
-GEOMImpl_IFieldOperations::GEOMImpl_IFieldOperations (GEOM_Engine* theEngine, int theDocID)
-: GEOM_IOperations(theEngine, theDocID)
+GEOMImpl_IFieldOperations::GEOMImpl_IFieldOperations (GEOM_Engine* theEngine)
+: GEOM_IOperations(theEngine)
 {
   MESSAGE("GEOMImpl_IFieldOperations::GEOMImpl_IFieldOperations");
 }
@@ -96,7 +96,7 @@ CreateField( const Handle(GEOM_Object)&                     theShape,
 
   // make a field
   Handle(GEOM_Field) aField = Handle(GEOM_Field)::DownCast
-    ( GetEngine()->AddBaseObject( GetDocID(), GEOM_FIELD ));
+    ( GetEngine()->AddBaseObject( GEOM_FIELD ));
 
   // set field data
   aField->Init( theShape, theName, theType, theDimension, theComponentNames );
@@ -142,7 +142,7 @@ int GEOMImpl_IFieldOperations::CountFields( const Handle(GEOM_Object)& theShape
   for (; anIt.More(); anIt.Next()) {
     TCollection_ExtendedString& anEntry = anIt.Value();
     anEntry.ToUTF8CString( (Standard_PCharacter&) pentry );
-    Handle(GEOM_BaseObject) anObj = GetEngine()->GetObject(GetDocID(), entry, false);
+    Handle(GEOM_BaseObject) anObj = GetEngine()->GetObject(entry, false);
     nbFields += ( !anObj.IsNull() && anObj->IsKind(STANDARD_TYPE(GEOM_Field)) );
   }
 
@@ -178,7 +178,7 @@ GEOMImpl_IFieldOperations::GetFields( const Handle(GEOM_Object)& theShape )
   for (; anIt.More(); anIt.Next()) {
     TCollection_ExtendedString& anEntry = anIt.Value();
     anEntry.ToUTF8CString( (Standard_PCharacter&) pentry );
-    Handle(GEOM_BaseObject) anObj = GetEngine()->GetObject(GetDocID(), entry, false);
+    Handle(GEOM_BaseObject) anObj = GetEngine()->GetObject(entry, false);
     if ( !anObj.IsNull() && anObj->IsKind(STANDARD_TYPE(GEOM_Field)) )
     {
         Handle(GEOM_Field) field = Handle(GEOM_Field)::DownCast( anObj );
@@ -222,7 +222,7 @@ GEOMImpl_IFieldOperations::GetField( const Handle(GEOM_Object)& theShape,
   for (; anIt.More(); anIt.Next()) {
     TCollection_ExtendedString& anEntry = anIt.Value();
     anEntry.ToUTF8CString( (Standard_PCharacter&) pentry );
-    field = Handle(GEOM_Field)::DownCast( GetEngine()->GetObject( GetDocID(), entry, false ));
+    field = Handle(GEOM_Field)::DownCast( GetEngine()->GetObject( entry, false ));
     if ( !field.IsNull() && field->GetName() == theName ) {
       SetErrorCode(OK);
       break;
index 4a4cd3ae2947612f262e6cb59aa31e3bced9675b..4358141eb68a9f45cd5afbfe5f6020488af11832 100644 (file)
@@ -34,7 +34,7 @@ class GEOM_Object;
 
 class GEOMImpl_IFieldOperations : public GEOM_IOperations {
  public:
-  Standard_EXPORT GEOMImpl_IFieldOperations(GEOM_Engine* theEngine, int theDocID);
+  Standard_EXPORT GEOMImpl_IFieldOperations(GEOM_Engine* theEngine);
   Standard_EXPORT ~GEOMImpl_IFieldOperations();
 
   Standard_EXPORT Handle(GEOM_Field)
index 4e6965c4fb52aab370b8cdb8e21ac22f52bfe847..46f57fac89310d0bae76230413a512323e614596 100644 (file)
@@ -53,8 +53,8 @@
  *   constructor:
  */
 //=============================================================================
-GEOMImpl_IGroupOperations::GEOMImpl_IGroupOperations (GEOM_Engine* theEngine, int theDocID)
-: GEOM_IOperations(theEngine, theDocID)
+GEOMImpl_IGroupOperations::GEOMImpl_IGroupOperations (GEOM_Engine* theEngine)
+: GEOM_IOperations(theEngine)
 {
   MESSAGE("GEOMImpl_IGroupOperations::GEOMImpl_IGroupOperations");
 }
index 68556eb138a9e4aac79defec4e55ba3521264819..3145e799c91e877276545ec0521eb50a9eca3fc8 100644 (file)
@@ -34,7 +34,7 @@
 
 class GEOMImpl_IGroupOperations : public GEOM_IOperations {
  public:
-  Standard_EXPORT GEOMImpl_IGroupOperations(GEOM_Engine* theEngine, int theDocID);
+  Standard_EXPORT GEOMImpl_IGroupOperations(GEOM_Engine* theEngine);
   Standard_EXPORT ~GEOMImpl_IGroupOperations();
 
   Standard_EXPORT Handle(GEOM_Object) CreateGroup(Handle(GEOM_Object) theMainShape, TopAbs_ShapeEnum  theShapeType);
index baf47d45d49b925be08aa7b94c87420d888d57db..f897d95735974720fe38f7d7b2771779870c1bf9 100644 (file)
@@ -60,8 +60,8 @@
  *   constructor:
  */
 //=============================================================================
-GEOMImpl_IHealingOperations::GEOMImpl_IHealingOperations (GEOM_Engine* theEngine, int theDocID)
-: GEOM_IOperations(theEngine, theDocID)
+GEOMImpl_IHealingOperations::GEOMImpl_IHealingOperations (GEOM_Engine* theEngine)
+: GEOM_IOperations(theEngine)
 {
   myModifStats = new ShHealOper_ModifStats;
   MESSAGE("GEOMImpl_IHealingOperations::GEOMImpl_IHealingOperations");
@@ -117,7 +117,7 @@ Handle(GEOM_Object) GEOMImpl_IHealingOperations::ShapeProcess (Handle(GEOM_Objec
   if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be processed
 
   // Add a new object
-  Handle(GEOM_Object) aNewObject = GetEngine()->AddObject( GetDocID(), GEOM_COPY );
+  Handle(GEOM_Object) aNewObject = GetEngine()->AddObject( GEOM_COPY );
 
   //Add the function
   aFunction = aNewObject->AddFunction(GEOMImpl_HealingDriver::GetID(), SHAPE_PROCESS);
@@ -334,7 +334,7 @@ Handle(GEOM_Object) GEOMImpl_IHealingOperations::SuppressFaces
   if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be processed
 
   // Add a new object
-  Handle(GEOM_Object) aNewObject = GetEngine()->AddObject(GetDocID(), GEOM_COPY);
+  Handle(GEOM_Object) aNewObject = GetEngine()->AddObject(GEOM_COPY);
 
   //Add the function
   aFunction = aNewObject->AddFunction(GEOMImpl_HealingDriver::GetID(), SUPPRESS_FACES);
@@ -402,7 +402,7 @@ Handle(GEOM_Object) GEOMImpl_IHealingOperations::CloseContour
   if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be processed
 
   // Add a new object
-  Handle(GEOM_Object) aNewObject = GetEngine()->AddObject( GetDocID(), GEOM_COPY );
+  Handle(GEOM_Object) aNewObject = GetEngine()->AddObject( GEOM_COPY );
 
   //Add the function
   aFunction = aNewObject->AddFunction(GEOMImpl_HealingDriver::GetID(), CLOSE_CONTOUR);
@@ -471,7 +471,7 @@ Handle(GEOM_Object) GEOMImpl_IHealingOperations::RemoveIntWires
   if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be processed
 
   // Add a new object
-  Handle(GEOM_Object) aNewObject = GetEngine()->AddObject( GetDocID(), GEOM_COPY );
+  Handle(GEOM_Object) aNewObject = GetEngine()->AddObject( GEOM_COPY );
 
   //Add the function
   aFunction = aNewObject->AddFunction(GEOMImpl_HealingDriver::GetID(), REMOVE_INT_WIRES);
@@ -538,7 +538,7 @@ Handle(GEOM_Object) GEOMImpl_IHealingOperations::FillHoles (Handle(GEOM_Object)
   if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be processed
 
   // Add a new object
-  Handle(GEOM_Object) aNewObject = GetEngine()->AddObject( GetDocID(), GEOM_COPY );
+  Handle(GEOM_Object) aNewObject = GetEngine()->AddObject( GEOM_COPY );
 
   //Add the function
   aFunction = aNewObject->AddFunction(GEOMImpl_HealingDriver::GetID(), FILL_HOLES);
@@ -611,7 +611,7 @@ GEOMImpl_IHealingOperations::Sew (std::list<Handle(GEOM_Object)>& theObjects,
   }
 
   // Add a new object
-  Handle(GEOM_Object) aNewObject = GetEngine()->AddObject( GetDocID(), GEOM_COPY );
+  Handle(GEOM_Object) aNewObject = GetEngine()->AddObject( GEOM_COPY );
 
   //Add the function
   int aFunctionType = (isAllowNonManifold ? SEWING_NON_MANIFOLD : SEWING);
@@ -680,7 +680,7 @@ GEOMImpl_IHealingOperations::RemoveInternalFaces (std::list< Handle(GEOM_Object)
   }
 
   // Add a new object
-  Handle(GEOM_Object) aNewObject = GetEngine()->AddObject(GetDocID(), GEOM_COPY);
+  Handle(GEOM_Object) aNewObject = GetEngine()->AddObject(GEOM_COPY);
 
   //Add the function
   Handle(GEOM_Function)
@@ -738,7 +738,7 @@ Handle(GEOM_Object) GEOMImpl_IHealingOperations::DivideEdge (Handle(GEOM_Object)
   if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be processed
 
   // Add a new object
-  Handle(GEOM_Object) aNewObject = GetEngine()->AddObject( GetDocID(), GEOM_COPY );
+  Handle(GEOM_Object) aNewObject = GetEngine()->AddObject( GEOM_COPY );
 
   //Add the function
   aFunction = aNewObject->AddFunction(GEOMImpl_HealingDriver::GetID(), DIVIDE_EDGE);
@@ -805,7 +805,7 @@ GEOMImpl_IHealingOperations::DivideEdgeByPoint (Handle(GEOM_Object)
   }
 
   // Add a new object
-  Handle(GEOM_Object) aNewObject = GetEngine()->AddObject( GetDocID(), GEOM_COPY );
+  Handle(GEOM_Object) aNewObject = GetEngine()->AddObject( GEOM_COPY );
 
   //Add the function
   aFunction = aNewObject->AddFunction(GEOMImpl_HealingDriver::GetID(), DIVIDE_EDGE_BY_POINT);
@@ -860,7 +860,7 @@ Handle(GEOM_Object) GEOMImpl_IHealingOperations::FuseCollinearEdgesWithinWire
   if (theWire.IsNull()) return NULL;
 
   // Add a new object
-  Handle(GEOM_Object) aRes = GetEngine()->AddObject(GetDocID(), theWire->GetType());
+  Handle(GEOM_Object) aRes = GetEngine()->AddObject(theWire->GetType());
 
   // Add a new function
   Handle(GEOM_Function) aFunction;
@@ -973,7 +973,7 @@ bool GEOMImpl_IHealingOperations::GetFreeBoundary (Handle(TColStd_HSequenceOfTra
   TopExp_Explorer anExp;
   for ( anExp.Init( aClosed, TopAbs_WIRE ); anExp.More(); anExp.Next() )
   {
-    anObj = GetEngine()->AddObject( GetDocID(), GEOM_FREE_BOUNDS );
+    anObj = GetEngine()->AddObject( GEOM_FREE_BOUNDS );
     aFunction = anObj->AddFunction( GEOMImpl_CopyDriver::GetID(), COPY_WITHOUT_REF );
     TopoDS_Shape aValueShape = anExp.Current();
     aFunction->SetValue( aValueShape );
@@ -981,7 +981,7 @@ bool GEOMImpl_IHealingOperations::GetFreeBoundary (Handle(TColStd_HSequenceOfTra
   }
   for ( anExp.Init( anOpen, TopAbs_WIRE ); anExp.More(); anExp.Next() )
   {
-    anObj = GetEngine()->AddObject( GetDocID(), GEOM_FREE_BOUNDS );
+    anObj = GetEngine()->AddObject( GEOM_FREE_BOUNDS );
     aFunction = anObj->AddFunction( GEOMImpl_CopyDriver::GetID(), COPY_WITHOUT_REF );
     TopoDS_Shape aValueShape = anExp.Current();
     aFunction->SetValue( aValueShape );
@@ -1116,7 +1116,7 @@ Handle(GEOM_Object) GEOMImpl_IHealingOperations::ChangeOrientationCopy (Handle(G
     return NULL; //There is no function which creates an object to be processed
 
   // Add a new object
-  Handle(GEOM_Object) aNewObject = GetEngine()->AddObject(GetDocID(), GEOM_COPY);
+  Handle(GEOM_Object) aNewObject = GetEngine()->AddObject(GEOM_COPY);
 
   if (theObject->GetType() == GEOM_VECTOR) { // Mantis issue 21066
     //Add the function
@@ -1189,7 +1189,7 @@ Handle(GEOM_Object) GEOMImpl_IHealingOperations::LimitTolerance (Handle(GEOM_Obj
     return NULL; // There is no function which creates an object to be processed
 
   // Add a new object
-  Handle(GEOM_Object) aNewObject = GetEngine()->AddObject(GetDocID(), theObject->GetType());
+  Handle(GEOM_Object) aNewObject = GetEngine()->AddObject(theObject->GetType());
 
   // Add the function
   aFunction = aNewObject->AddFunction(GEOMImpl_HealingDriver::GetID(), LIMIT_TOLERANCE);
index 8412c79f8b96a1619cc2baa58548c2dc0ab8a246..d29456e89f2ec7c3d6ca808932413cec3413c955 100644 (file)
@@ -37,7 +37,7 @@ class ShHealOper_ModifStats;
 
 class GEOMImpl_IHealingOperations : public GEOM_IOperations {
  public:
-  Standard_EXPORT GEOMImpl_IHealingOperations(GEOM_Engine* theEngine, int theDocID);
+  Standard_EXPORT GEOMImpl_IHealingOperations(GEOM_Engine* theEngine);
   Standard_EXPORT ~GEOMImpl_IHealingOperations();
 
   // Apply Shape Processing to the selected Object
index 6b12c9bf2efa71826ffed4578e29ec2e4d024dea..d41f1825d1c01bf26197fcac283ccb8d49950532 100644 (file)
  *  constructor
  */
 //=============================================================================
-GEOMImpl_IInsertOperations::GEOMImpl_IInsertOperations(GEOM_Engine* theEngine, int theDocID)
-: GEOM_IOperations(theEngine, theDocID)
+GEOMImpl_IInsertOperations::GEOMImpl_IInsertOperations(GEOM_Engine* theEngine)
+: GEOM_IOperations(theEngine)
 {
   MESSAGE("GEOMImpl_IInsertOperations::GEOMImpl_IInsertOperations");
-  myShapesOperations = new GEOMImpl_IShapesOperations(GetEngine(), GetDocID());
-  myGroupOperations = new GEOMImpl_IGroupOperations(GetEngine(), GetDocID());
-  myFieldOperations = new GEOMImpl_IFieldOperations(GetEngine(), GetDocID());
+  myShapesOperations = new GEOMImpl_IShapesOperations(GetEngine());
+  myGroupOperations = new GEOMImpl_IGroupOperations(GetEngine());
+  myFieldOperations = new GEOMImpl_IFieldOperations(GetEngine());
 }
 
 //=============================================================================
@@ -107,7 +107,7 @@ Handle(GEOM_Object) GEOMImpl_IInsertOperations::MakeCopy (Handle(GEOM_Object) th
   if (theOriginal.IsNull()) return NULL;
 
   //Add a new Copy object
-  Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), GEOM_COPY);
+  Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GEOM_COPY);
 
   //Add a Copy function for creation a copy object
   Handle(GEOM_Function) aFunction = aCopy->AddFunction(GEOMImpl_CopyDriver::GetID(), COPY_WITH_REF);
@@ -157,7 +157,7 @@ void GEOMImpl_IInsertOperations::Export
 
   if (theOriginal.IsNull()) return;
 
-  if ( !GEOMImpl_IECallBack::GetCallBack( theFormatName )->Export( GetDocID(), theOriginal, theFileName, theFormatName ) )
+  if ( !GEOMImpl_IECallBack::GetCallBack( theFormatName )->Export( theOriginal, theFileName, theFormatName ) )
     return;
   SetErrorCode(OK);
 }
@@ -176,7 +176,7 @@ Handle(TColStd_HSequenceOfTransient) GEOMImpl_IInsertOperations::Import
   if (theFileName.IsEmpty() || theFormatName.IsEmpty()) return NULL;
 
   Handle(TColStd_HSequenceOfTransient) aSeq =
-    GEOMImpl_IECallBack::GetCallBack( theFormatName )->Import( GetDocID(), theFormatName, theFileName );
+    GEOMImpl_IECallBack::GetCallBack( theFormatName )->Import( theFormatName, theFileName );
   SetErrorCode(OK);
   return aSeq;
 }
@@ -195,7 +195,7 @@ TCollection_AsciiString GEOMImpl_IInsertOperations::ReadValue
   TCollection_AsciiString aValue;
   if (theFileName.IsEmpty() || theFormatName.IsEmpty() || theParameterName.IsEmpty()) return aValue;
 
-  aValue = GEOMImpl_IECallBack::GetCallBack( theFormatName )->ReadValue( GetDocID(), theFileName, theFormatName, theParameterName );
+  aValue = GEOMImpl_IECallBack::GetCallBack( theFormatName )->ReadValue( theFileName, theFormatName, theParameterName );
 
   SetErrorCode(OK);
   return aValue;
@@ -211,7 +211,7 @@ Handle(GEOM_Object) GEOMImpl_IInsertOperations::RestoreShape (std::istringstream
   SetErrorCode(KO);
 
   //Add a new result object
-  Handle(GEOM_Object) result = GetEngine()->AddObject(GetDocID(), GEOM_COPY);
+  Handle(GEOM_Object) result = GetEngine()->AddObject(GEOM_COPY);
 
   //Add a Copy function
   Handle(GEOM_Function) aFunction = result->AddFunction(GEOMImpl_CopyDriver::GetID(), COPY_WITHOUT_REF);
@@ -298,7 +298,7 @@ int GEOMImpl_IInsertOperations::LoadTexture(const TCollection_AsciiString& theTe
   for (i = 1, bdit = bytedata.begin(); bdit != bytedata.end(); ++bdit, ++i)
     aTexture->SetValue(i, (Standard_Byte)(*bdit));
 
-  int aTextureId = GetEngine()->addTexture(GetDocID(), lenbytes*8, lines.size(), aTexture, theTextureFile);
+  int aTextureId = GetEngine()->addTexture(lenbytes*8, lines.size(), aTexture, theTextureFile);
   if (aTextureId > 0) SetErrorCode(OK);
   return aTextureId;
 }
@@ -307,7 +307,7 @@ int GEOMImpl_IInsertOperations::AddTexture(int theWidth, int theHeight,
                                            const Handle(TColStd_HArray1OfByte)& theTexture)
 {
   SetErrorCode(KO);
-  int aTextureId = GetEngine()->addTexture(GetDocID(), theWidth, theHeight, theTexture);
+  int aTextureId = GetEngine()->addTexture(theWidth, theHeight, theTexture);
   if (aTextureId > 0) SetErrorCode(OK);
   return aTextureId;
 }
@@ -325,7 +325,7 @@ Handle(TColStd_HArray1OfByte) GEOMImpl_IInsertOperations::GetTexture(int theText
   if (theTextureId <= 0)
     return aTexture;
 
-  aTexture = GetEngine()->getTexture(GetDocID(), theTextureId, theWidth, theHeight, aFileName);
+  aTexture = GetEngine()->getTexture(theTextureId, theWidth, theHeight, aFileName);
 
   if (theWidth > 0 && theHeight > 0 && aTexture->Length() > 0) SetErrorCode(OK);
 
@@ -335,7 +335,7 @@ Handle(TColStd_HArray1OfByte) GEOMImpl_IInsertOperations::GetTexture(int theText
 std::list<int> GEOMImpl_IInsertOperations::GetAllTextures()
 {
   SetErrorCode(KO);
-  std::list<int> id_list = GetEngine()->getAllTextures(GetDocID());
+  std::list<int> id_list = GetEngine()->getAllTextures();
   SetErrorCode(OK);
   return id_list;
 }
@@ -359,7 +359,7 @@ bool GEOMImpl_IInsertOperations::TransferData
 
   //Add a new Transfer Data object object
   Handle(GEOM_Object) aTDObj =
-    GetEngine()->AddObject(GetDocID(), GEOM_TRANSFER_DATA);
+    GetEngine()->AddObject(GEOM_TRANSFER_DATA);
 
   //Add a Transfer Data function for created object
   Handle(GEOM_Function) aFunction =
index c4e41b09bc0f7379bdd1dc989347a7bb14d6e8dc..7552ba4a9176d8fb9ab1787b2a1638fe5ca55d83 100644 (file)
@@ -56,7 +56,7 @@ class GEOMImpl_IInsertOperations : public GEOM_IOperations {
     long                    myMaxNumber;
   };
 
-  Standard_EXPORT GEOMImpl_IInsertOperations(GEOM_Engine* theEngine, int theDocID);
+  Standard_EXPORT GEOMImpl_IInsertOperations(GEOM_Engine* theEngine);
   Standard_EXPORT ~GEOMImpl_IInsertOperations();
 
 
index fdd3c307bafb7766158d4f5a2fef162b68091dd5..726b8271953b55958d581b6f85ea00d82866aadc 100644 (file)
@@ -67,8 +67,8 @@
  *   constructor:
  */
 //=============================================================================
-GEOMImpl_ILocalOperations::GEOMImpl_ILocalOperations (GEOM_Engine* theEngine, int theDocID)
-: GEOM_IOperations(theEngine, theDocID)
+GEOMImpl_ILocalOperations::GEOMImpl_ILocalOperations (GEOM_Engine* theEngine)
+: GEOM_IOperations(theEngine)
 {
   MESSAGE("GEOMImpl_ILocalOperations::GEOMImpl_ILocalOperations");
 }
@@ -95,7 +95,7 @@ Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeFilletAll
   SetErrorCode(KO);
 
   //Add a new Fillet object
-  Handle(GEOM_Object) aFillet = GetEngine()->AddObject(GetDocID(), GEOM_FILLET);
+  Handle(GEOM_Object) aFillet = GetEngine()->AddObject(GEOM_FILLET);
 
   //Add a new Fillet function
   Handle(GEOM_Function) aFunction =
@@ -146,7 +146,7 @@ Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeFilletEdges
   SetErrorCode(KO);
 
   //Add a new Fillet object
-  Handle(GEOM_Object) aFillet = GetEngine()->AddObject(GetDocID(), GEOM_FILLET);
+  Handle(GEOM_Object) aFillet = GetEngine()->AddObject(GEOM_FILLET);
 
   //Add a new Fillet function
   Handle(GEOM_Function) aFunction =
@@ -213,7 +213,7 @@ Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeFilletEdgesR1R2
   SetErrorCode(KO);
 
   //Add a new Fillet object
-  Handle(GEOM_Object) aFillet = GetEngine()->AddObject(GetDocID(), GEOM_FILLET);
+  Handle(GEOM_Object) aFillet = GetEngine()->AddObject(GEOM_FILLET);
 
   //Add a new Fillet function
   Handle(GEOM_Function) aFunction =
@@ -282,7 +282,7 @@ Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeFilletFaces
   SetErrorCode(KO);
 
   //Add a new Fillet object
-  Handle(GEOM_Object) aFillet = GetEngine()->AddObject(GetDocID(), GEOM_FILLET);
+  Handle(GEOM_Object) aFillet = GetEngine()->AddObject(GEOM_FILLET);
 
   //Add a new Fillet function
   Handle(GEOM_Function) aFunction =
@@ -349,7 +349,7 @@ Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeFilletFacesR1R2
   SetErrorCode(KO);
 
   //Add a new Fillet object
-  Handle(GEOM_Object) aFillet = GetEngine()->AddObject(GetDocID(), GEOM_FILLET);
+  Handle(GEOM_Object) aFillet = GetEngine()->AddObject(GEOM_FILLET);
 
   //Add a new Fillet function
   Handle(GEOM_Function) aFunction =
@@ -417,7 +417,7 @@ Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeFillet2D
   SetErrorCode(KO);
 
   //Add a new Fillet object
-  Handle(GEOM_Object) aFillet2D = GetEngine()->AddObject(GetDocID(), GEOM_FILLET_2D);
+  Handle(GEOM_Object) aFillet2D = GetEngine()->AddObject(GEOM_FILLET_2D);
 
   //Add a new Fillet function
   Handle(GEOM_Function) aFunction =
@@ -485,7 +485,7 @@ Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeFillet1D
   SetErrorCode(KO);
 
   //Add a new Fillet object
-  Handle(GEOM_Object) aFillet1D = GetEngine()->AddObject(GetDocID(), GEOM_FILLET_1D);
+  Handle(GEOM_Object) aFillet1D = GetEngine()->AddObject(GEOM_FILLET_1D);
 
   //Add a new Fillet function
   Handle(GEOM_Function) aFunction =
@@ -553,7 +553,7 @@ Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeChamferAll (Handle(GEOM_Objec
   SetErrorCode(KO);
 
   //Add a new Chamfer object
-  Handle(GEOM_Object) aChamfer = GetEngine()->AddObject(GetDocID(), GEOM_CHAMFER);
+  Handle(GEOM_Object) aChamfer = GetEngine()->AddObject(GEOM_CHAMFER);
 
   //Add a new Chamfer function
   Handle(GEOM_Function) aFunction =
@@ -605,7 +605,7 @@ Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeChamferEdge
   SetErrorCode(KO);
 
   //Add a new Chamfer object
-  Handle(GEOM_Object) aChamfer = GetEngine()->AddObject(GetDocID(), GEOM_CHAMFER);
+  Handle(GEOM_Object) aChamfer = GetEngine()->AddObject(GEOM_CHAMFER);
 
   //Add a new Chamfer function
   Handle(GEOM_Function) aFunction =
@@ -661,7 +661,7 @@ Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeChamferEdgeAD
   SetErrorCode(KO);
 
   //Add a new Chamfer object
-  Handle(GEOM_Object) aChamfer = GetEngine()->AddObject(GetDocID(), GEOM_CHAMFER);
+  Handle(GEOM_Object) aChamfer = GetEngine()->AddObject(GEOM_CHAMFER);
 
   //Add a new Chamfer function
   Handle(GEOM_Function) aFunction =
@@ -716,7 +716,7 @@ Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeChamferFaces
   SetErrorCode(KO);
 
   //Add a new Chamfer object
-  Handle(GEOM_Object) aChamfer = GetEngine()->AddObject(GetDocID(), GEOM_CHAMFER);
+  Handle(GEOM_Object) aChamfer = GetEngine()->AddObject(GEOM_CHAMFER);
 
   //Add a new Chamfer function
   Handle(GEOM_Function) aFunction =
@@ -785,7 +785,7 @@ Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeChamferFacesAD
   SetErrorCode(KO);
 
   //Add a new Chamfer object
-  Handle(GEOM_Object) aChamfer = GetEngine()->AddObject(GetDocID(), GEOM_CHAMFER);
+  Handle(GEOM_Object) aChamfer = GetEngine()->AddObject(GEOM_CHAMFER);
 
   //Add a new Chamfer function
   Handle(GEOM_Function) aFunction =
@@ -854,7 +854,7 @@ Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeChamferEdges
   SetErrorCode(KO);
 
   //Add a new Chamfer object
-  Handle(GEOM_Object) aChamfer = GetEngine()->AddObject(GetDocID(), GEOM_CHAMFER);
+  Handle(GEOM_Object) aChamfer = GetEngine()->AddObject(GEOM_CHAMFER);
 
   //Add a new Chamfer function
   Handle(GEOM_Function) aFunction =
@@ -924,7 +924,7 @@ Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeChamferEdgesAD
   SetErrorCode(KO);
 
   //Add a new Chamfer object
-  Handle(GEOM_Object) aChamfer = GetEngine()->AddObject(GetDocID(), GEOM_CHAMFER);
+  Handle(GEOM_Object) aChamfer = GetEngine()->AddObject(GEOM_CHAMFER);
 
   //Add a new Chamfer function
   Handle(GEOM_Function) aFunction =
@@ -995,7 +995,7 @@ Handle(GEOM_Object) GEOMImpl_ILocalOperations::MakeArchimede (Handle(GEOM_Object
   SetErrorCode(KO);
 
   //Add a new Archimede object
-  Handle(GEOM_Object) aChamfer = GetEngine()->AddObject(GetDocID(), GEOM_ARCHIMEDE);
+  Handle(GEOM_Object) aChamfer = GetEngine()->AddObject(GEOM_ARCHIMEDE);
 
   //Add a new Archimede function
   Handle(GEOM_Function) aFunction = aChamfer->AddFunction(GEOMImpl_ArchimedeDriver::GetID(), ARCHIMEDE_TYPE);
@@ -1073,7 +1073,7 @@ Standard_Integer GEOMImpl_ILocalOperations::GetSubShapeIndex (Handle(GEOM_Object
 
   if (aGen) {
     GEOMImpl_IShapesOperations* anIShapesOperations =
-      aGen->GetIShapesOperations(GetDocID());
+      aGen->GetIShapesOperations();
     anInd = anIShapesOperations->GetSubShapeIndex(theShape, theSubShape);
     SetErrorCode(anIShapesOperations->GetErrorCode());
   }
index 672e7daf45c64f1af060983f109be040847e5b68..371671f4005d084ca0ce25475a42882dedc61549 100644 (file)
@@ -33,7 +33,7 @@
 
 class GEOMImpl_ILocalOperations : public GEOM_IOperations {
  public:
-  Standard_EXPORT GEOMImpl_ILocalOperations(GEOM_Engine* theEngine, int theDocID);
+  Standard_EXPORT GEOMImpl_ILocalOperations(GEOM_Engine* theEngine);
   Standard_EXPORT ~GEOMImpl_ILocalOperations();
 
   Standard_EXPORT Handle(GEOM_Object) MakeFilletAll   (Handle(GEOM_Object) theShape, double theR);
index 080d8b858fdfb53d59928de740eb7eaeae84198f..5ba7548b4fca71a80f277453503802690957f7be 100644 (file)
@@ -86,8 +86,8 @@
  *  Constructor
  */
 //=============================================================================
-GEOMImpl_IMeasureOperations::GEOMImpl_IMeasureOperations (GEOM_Engine* theEngine, int theDocID)
-: GEOM_IOperations(theEngine, theDocID)
+GEOMImpl_IMeasureOperations::GEOMImpl_IMeasureOperations (GEOM_Engine* theEngine)
+: GEOM_IOperations(theEngine)
 {
   MESSAGE("GEOMImpl_IMeasureOperations::GEOMImpl_IMeasureOperations");
 }
@@ -807,7 +807,7 @@ Handle(GEOM_Object) GEOMImpl_IMeasureOperations::GetCentreOfMass
   if (theShape.IsNull()) return NULL;
 
   //Add a new CentreOfMass object
-  Handle(GEOM_Object) aCDG = GetEngine()->AddObject(GetDocID(), GEOM_CDG);
+  Handle(GEOM_Object) aCDG = GetEngine()->AddObject(GEOM_CDG);
 
   //Add a new CentreOfMass function
   Handle(GEOM_Function) aFunction =
@@ -862,7 +862,7 @@ Handle(GEOM_Object) GEOMImpl_IMeasureOperations::GetVertexByIndex
   if (aRefShape.IsNull()) return NULL;
 
   //Add a new Vertex object
-  Handle(GEOM_Object) aVertex = GetEngine()->AddObject(GetDocID(), GEOM_POINT);
+  Handle(GEOM_Object) aVertex = GetEngine()->AddObject(GEOM_POINT);
 
   //Add a function
   Handle(GEOM_Function) aFunction =
@@ -911,7 +911,7 @@ Handle(GEOM_Object) GEOMImpl_IMeasureOperations::GetNormal
   if (theFace.IsNull()) return NULL;
 
   //Add a new Normale object
-  Handle(GEOM_Object) aNorm = GetEngine()->AddObject(GetDocID(), GEOM_VECTOR);
+  Handle(GEOM_Object) aNorm = GetEngine()->AddObject(GEOM_VECTOR);
 
   //Add a new Normale function
   Handle(GEOM_Function) aFunction =
@@ -1152,7 +1152,7 @@ Handle(GEOM_Object) GEOMImpl_IMeasureOperations::GetBoundingBox
   if (theShape.IsNull()) return NULL;
 
   //Add a new BoundingBox object
-  Handle(GEOM_Object) aBnd = GetEngine()->AddObject(GetDocID(), GEOM_BOX);
+  Handle(GEOM_Object) aBnd = GetEngine()->AddObject(GEOM_BOX);
 
   //Add a new BoundingBox function
   const int aType = (precise ? BND_BOX_MEASURE_PRECISE : BND_BOX_MEASURE);
index 3ee2311289e49c8f97db87604286d00dca4f3ed3..29bb2ba2140529c0cbc630f12ebc3fcf9f561868 100644 (file)
@@ -41,7 +41,7 @@ class GEOM_Object;
 
 class GEOMImpl_IMeasureOperations : public GEOM_IOperations {
  public:
-  Standard_EXPORT GEOMImpl_IMeasureOperations(GEOM_Engine* theEngine, int theDocID);
+  Standard_EXPORT GEOMImpl_IMeasureOperations(GEOM_Engine* theEngine);
   Standard_EXPORT ~GEOMImpl_IMeasureOperations();
 
   enum ShapeKind {
index fd5f459f9fb2160e7d99c4569fd3112e5cc5a380..d24cc9c8a89e284cd221126c94f119c774830b5d 100644 (file)
@@ -168,8 +168,8 @@ namespace
  *   constructor:
  */
 //=============================================================================
-GEOMImpl_IShapesOperations::GEOMImpl_IShapesOperations (GEOM_Engine* theEngine, int theDocID)
-: GEOM_IOperations(theEngine, theDocID)
+GEOMImpl_IShapesOperations::GEOMImpl_IShapesOperations (GEOM_Engine* theEngine)
+: GEOM_IOperations(theEngine)
 {
   MESSAGE("GEOMImpl_IShapesOperations::GEOMImpl_IShapesOperations");
 }
@@ -197,7 +197,7 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::MakeEdge
   if (thePnt1.IsNull() || thePnt2.IsNull()) return NULL;
 
   //Add a new Edge object
-  Handle(GEOM_Object) anEdge = GetEngine()->AddObject(GetDocID(), GEOM_EDGE);
+  Handle(GEOM_Object) anEdge = GetEngine()->AddObject(GEOM_EDGE);
 
   //Add a new Vector function
   Handle(GEOM_Function) aFunction =
@@ -252,7 +252,7 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::MakeEdgeOnCurveByLength
   if (theRefCurve.IsNull()) return NULL;
 
   //Add a new Edge object
-  Handle(GEOM_Object) anEdge = GetEngine()->AddObject(GetDocID(), GEOM_EDGE);
+  Handle(GEOM_Object) anEdge = GetEngine()->AddObject(GEOM_EDGE);
 
   //Add a new Vector function
   Handle(GEOM_Function) aFunction =
@@ -311,7 +311,7 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::MakeEdgeWire
   if (theWire.IsNull()) return NULL;
 
   //Add a new Edge object
-  Handle(GEOM_Object) anEdge = GetEngine()->AddObject(GetDocID(), GEOM_EDGE);
+  Handle(GEOM_Object) anEdge = GetEngine()->AddObject(GEOM_EDGE);
 
   //Add a new Vector function
   Handle(GEOM_Function) aFunction =
@@ -377,7 +377,7 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::MakeWire
   SetErrorCode(KO);
 
   //Add a new object
-  Handle(GEOM_Object) aWire = GetEngine()->AddObject(GetDocID(), GEOM_WIRE);
+  Handle(GEOM_Object) aWire = GetEngine()->AddObject(GEOM_WIRE);
 
   //Add a new function
   Handle(GEOM_Function) aFunction =
@@ -449,7 +449,7 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::MakeFace (Handle(GEOM_Object) th
   if (theWire.IsNull()) return NULL;
 
   //Add a new Face object
-  Handle(GEOM_Object) aFace = GetEngine()->AddObject(GetDocID(), GEOM_FACE);
+  Handle(GEOM_Object) aFace = GetEngine()->AddObject(GEOM_FACE);
 
   //Add a new Shape function for creation of a face from a wire
   Handle(GEOM_Function) aFunction =
@@ -509,7 +509,7 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::MakeFaceWires
   SetErrorCode(KO);
 
   //Add a new object
-  Handle(GEOM_Object) aShape = GetEngine()->AddObject(GetDocID(), GEOM_FACE);
+  Handle(GEOM_Object) aShape = GetEngine()->AddObject(GEOM_FACE);
 
   //Add a new function
   Handle(GEOM_Function) aFunction =
@@ -588,7 +588,7 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::MakeFaceFromSurface
   SetErrorCode(KO);
 
   //Add a new object
-  Handle(GEOM_Object) aShape = GetEngine()->AddObject(GetDocID(), GEOM_FACE);
+  Handle(GEOM_Object) aShape = GetEngine()->AddObject(GEOM_FACE);
 
   //Add a new function
   Handle(GEOM_Function) aFunction =
@@ -658,7 +658,7 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::MakeFaceWithConstraints
   SetErrorCode(KO);
 
   //Add a new object
-  Handle(GEOM_Object) aShape = GetEngine()->AddObject(GetDocID(), GEOM_FILLING);
+  Handle(GEOM_Object) aShape = GetEngine()->AddObject(GEOM_FILLING);
 
   //Add a new function
   Handle(GEOM_Function) aFunction =
@@ -799,7 +799,7 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::MakeShape
   SetErrorCode(KO);
 
   //Add a new object
-  Handle(GEOM_Object) aShape = GetEngine()->AddObject(GetDocID(), theObjectType);
+  Handle(GEOM_Object) aShape = GetEngine()->AddObject(theObjectType);
 
   //Add a new function
   Handle(GEOM_Function) aFunction =
@@ -869,7 +869,7 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::MakeSolidFromConnectedFaces
   SetErrorCode(KO);
 
   //Add a new object
-  Handle(GEOM_Object) aSolid = GetEngine()->AddObject(GetDocID(), GEOM_SOLID);
+  Handle(GEOM_Object) aSolid = GetEngine()->AddObject(GEOM_SOLID);
 
   //Add a new function
   Handle(GEOM_Function) aFunction =
@@ -947,7 +947,7 @@ GEOMImpl_IShapesOperations::MakeGlueFaces (std::list< Handle(GEOM_Object) >& the
   }
 
   //Add a new Glued object
-  Handle(GEOM_Object) aGlued = GetEngine()->AddObject(GetDocID(), GEOM_GLUED);
+  Handle(GEOM_Object) aGlued = GetEngine()->AddObject(GEOM_GLUED);
 
   //Add a new Glue function
   Handle(GEOM_Function) aFunction;
@@ -1095,7 +1095,7 @@ GEOMImpl_IShapesOperations::MakeGlueFacesByList(std::list< Handle(GEOM_Object) >
   }
 
   //Add a new Glued object
-  Handle(GEOM_Object) aGlued = GetEngine()->AddObject(GetDocID(), GEOM_GLUED);
+  Handle(GEOM_Object) aGlued = GetEngine()->AddObject(GEOM_GLUED);
 
   //Add a new Glue function
   Handle(GEOM_Function) aFunction;
@@ -1163,7 +1163,7 @@ GEOMImpl_IShapesOperations::MakeGlueEdges (std::list< Handle(GEOM_Object) >& the
   }
 
   //Add a new Glued object
-  Handle(GEOM_Object) aGlued = GetEngine()->AddObject(GetDocID(), GEOM_GLUED);
+  Handle(GEOM_Object) aGlued = GetEngine()->AddObject(GEOM_GLUED);
 
   //Add a new Glue function
   Handle(GEOM_Function) aFunction;
@@ -1344,7 +1344,7 @@ GEOMImpl_IShapesOperations::MakeGlueEdgesByList (std::list< Handle(GEOM_Object)
     return NULL;
   }
   //Add a new Glued object
-  Handle(GEOM_Object) aGlued = GetEngine()->AddObject(GetDocID(), GEOM_GLUED);
+  Handle(GEOM_Object) aGlued = GetEngine()->AddObject(GEOM_GLUED);
 
   //Add a new Glue function
   Handle(GEOM_Function) aFunction;
@@ -1452,7 +1452,7 @@ GEOMImpl_IShapesOperations::GetExistingSubObjects(Handle(GEOM_Object)    theShap
     Standard_Integer aStrLen = anEntry.LengthOfCString();
     char* anEntryStr = new char[aStrLen+1];
     anEntry.ToUTF8CString(anEntryStr);
-    Handle(GEOM_BaseObject) anObj = GetEngine()->GetObject(GetDocID(), anEntryStr, false);
+    Handle(GEOM_BaseObject) anObj = GetEngine()->GetObject(anEntryStr, false);
     if (!anObj.IsNull() ) {
       bool isGroup    = anObj->IsKind(STANDARD_TYPE(GEOM_Object)) && anObj->GetType() == GEOM_GROUP;
       bool isSubShape = anObj->IsKind(STANDARD_TYPE(GEOM_Object)) && anObj->GetType() != GEOM_GROUP;
@@ -1553,7 +1553,7 @@ Handle(TColStd_HSequenceOfTransient) GEOMImpl_IShapesOperations::MakeExplode
 
     //anObj = GetEngine()->AddSubShape(theShape, anArray);
     {
-      anObj = GetEngine()->AddObject(GetDocID(), GEOM_SUBSHAPE);
+      anObj = GetEngine()->AddObject(GEOM_SUBSHAPE);
       Handle(GEOM_Function) aFunction = anObj->AddFunction(GEOM_Object::GetSubShapeID(), 1);
       if (aFunction.IsNull()) return aSeq;
 
@@ -1766,7 +1766,7 @@ Handle(TColStd_HSequenceOfTransient) GEOMImpl_IShapesOperations::MakeSubShapes
       anArray = new TColStd_HArray1OfInteger(1,1);
       anArray->SetValue(1, id);
 
-      anObj = GetEngine()->AddObject(GetDocID(), GEOM_SUBSHAPE);
+      anObj = GetEngine()->AddObject(GEOM_SUBSHAPE);
       if (!anObj.IsNull()) {
         Handle(GEOM_Function) aFunction = anObj->AddFunction(GEOM_Object::GetSubShapeID(), 1);
         if (aFunction.IsNull()) return aSeq;
@@ -2155,7 +2155,7 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::ReverseShape(Handle(GEOM_Object)
 
   /*
   //Add a new reversed object
-  Handle(GEOM_Object) aReversed = GetEngine()->AddObject(GetDocID(), theShape->GetType());
+  Handle(GEOM_Object) aReversed = GetEngine()->AddObject(theShape->GetType());
 
   //Add a new Revese function
   Handle(GEOM_Function) aFunction;
@@ -2201,7 +2201,7 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::ReverseShape(Handle(GEOM_Object)
 
   if (aGen) {
     GEOMImpl_IHealingOperations* anIHealingOperations =
-      aGen->GetIHealingOperations(GetDocID());
+      aGen->GetIHealingOperations();
     aReversed = anIHealingOperations->ChangeOrientationCopy(theShape);
     SetErrorCode(anIHealingOperations->GetErrorCode());
   }
@@ -3000,7 +3000,7 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::GetShapesOnShapeAsCompound
   }
 
   //Add a new result object
-  Handle(GEOM_Object) aRes = GetEngine()->AddObject(GetDocID(), GEOM_SHAPES_ON_SHAPE);
+  Handle(GEOM_Object) aRes = GetEngine()->AddObject(GEOM_SHAPES_ON_SHAPE);
   Handle(GEOM_Function) aFunction =
     aRes->AddFunction(GEOMImpl_ShapeDriver::GetID(), SHAPES_ON_SHAPE);
   aFunction->SetValue(aCompound);
@@ -3182,7 +3182,7 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::MakeExtraction
 
   //Add a new Result object
   Handle(GEOM_Object) aResult =
-              GetEngine()->AddObject(GetDocID(), GEOM_EXTRACTION);
+              GetEngine()->AddObject(GEOM_EXTRACTION);
 
   //Add a new Extraction function
   Handle(GEOM_Function) aFunction =
@@ -5140,7 +5140,7 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::ExtendEdge
   }
 
   //Add a new Edge object
-  Handle(GEOM_Object) aResEdge = GetEngine()->AddObject(GetDocID(), GEOM_EDGE);
+  Handle(GEOM_Object) aResEdge = GetEngine()->AddObject(GEOM_EDGE);
 
   //Add a new Vector function
   Handle(GEOM_Function) aFunction =
@@ -5207,7 +5207,7 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::ExtendFace
   }
 
   //Add a new Face object
-  Handle(GEOM_Object) aResFace = GetEngine()->AddObject(GetDocID(), GEOM_FACE);
+  Handle(GEOM_Object) aResFace = GetEngine()->AddObject(GEOM_FACE);
 
   //Add a new Vector function
   Handle(GEOM_Function) aFunction =
@@ -5273,7 +5273,7 @@ Handle(GEOM_Object) GEOMImpl_IShapesOperations::MakeSurfaceFromFace
   }
 
   //Add a new Face object
-  Handle(GEOM_Object) aResFace = GetEngine()->AddObject(GetDocID(), GEOM_FACE);
+  Handle(GEOM_Object) aResFace = GetEngine()->AddObject(GEOM_FACE);
 
   //Add a new Vector function
   Handle(GEOM_Function) aFunction =
index 2b2631cd6e0d97b60485313ae10b3b69bdcc0503..b6d11a822dbe3ea325179c051b6bc6c2af36f63a 100644 (file)
@@ -78,7 +78,7 @@ class GEOMImpl_IShapesOperations : public GEOM_IOperations
     std::list<Standard_Integer> indices; ///< Shape indices touched by this type of modification.
   };
 
-  Standard_EXPORT GEOMImpl_IShapesOperations(GEOM_Engine* theEngine, int theDocID);
+  Standard_EXPORT GEOMImpl_IShapesOperations(GEOM_Engine* theEngine);
   Standard_EXPORT ~GEOMImpl_IShapesOperations();
 
   Standard_EXPORT Handle(GEOM_Object) MakeEdge (Handle(GEOM_Object) thePoint1,
index 34af46dff016b6785e80ee30876e9114a1719e40..e2046fb0f15f25cff1d9a6ff9f2284aa1b19d092 100644 (file)
@@ -77,8 +77,8 @@
  */
 //=============================================================================
 
-GEOMImpl_ITransformOperations::GEOMImpl_ITransformOperations (GEOM_Engine* theEngine, int theDocID)
-: GEOM_IOperations(theEngine, theDocID)
+GEOMImpl_ITransformOperations::GEOMImpl_ITransformOperations (GEOM_Engine* theEngine)
+: GEOM_IOperations(theEngine)
 {
   MESSAGE("GEOMImpl_ITransformOperations::GEOMImpl_ITransformOperations");
 }
@@ -217,7 +217,7 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::TranslateTwoPointsCopy
   if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be moved
 
   //Add a new Copy object
-  Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), GEOM_COPY);
+  Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GEOM_COPY);
 
   //Add a translate function
   Handle(GEOM_Function) aFunction =
@@ -270,7 +270,7 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::TranslateDXDYDZCopy
   if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be moved
 
   //Add a new Copy object
-  Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), GEOM_COPY);
+  Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GEOM_COPY);
 
   //Add a translate function
   Handle(GEOM_Function) aFunction =
@@ -375,7 +375,7 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::TranslateVectorCopy
   if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be moved
 
   //Add a new Copy object
-  Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), GEOM_COPY);
+  Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GEOM_COPY);
 
   //Add a translate function
   Handle(GEOM_Function) aFunction =
@@ -431,7 +431,7 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::TranslateVectorDistance
 
   //Add a translate function
   if (theCopy) {
-    aCopy = GetEngine()->AddObject(GetDocID(), theObject->GetType());
+    aCopy = GetEngine()->AddObject(theObject->GetType());
     aFunction = aCopy->AddFunction(GEOMImpl_TranslateDriver::GetID(), TRANSLATE_VECTOR_DISTANCE);
   }
   else {
@@ -493,7 +493,7 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::Translate1D
   if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be moved
 
   //Add a new Copy object
-  Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), theObject->GetType());
+  Handle(GEOM_Object) aCopy = GetEngine()->AddObject(theObject->GetType());
 
   //Add a translate function
   Handle(GEOM_Function) aFunction =
@@ -552,7 +552,7 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::Translate2D (Handle(GEOM_Obje
   if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be moved
 
   //Add a new Copy object
-  Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), theObject->GetType());
+  Handle(GEOM_Object) aCopy = GetEngine()->AddObject(theObject->GetType());
 
   //Add a translate function
   Handle(GEOM_Function) aFunction =
@@ -806,7 +806,7 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::MirrorPlaneCopy
   if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be mirrored
 
   //Add a new Copy object
-  Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), GEOM_COPY);
+  Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GEOM_COPY);
 
   //Add a mirror function
   Handle(GEOM_Function) aFunction =
@@ -909,7 +909,7 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::MirrorPointCopy
   if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be mirrored
 
   //Add a new Copy object
-  Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), GEOM_COPY);
+  Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GEOM_COPY);
 
   //Add a mirror function
   Handle(GEOM_Function) aFunction =
@@ -1012,7 +1012,7 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::MirrorAxisCopy
   if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be mirrored
 
   //Add a new Copy object
-  Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), GEOM_COPY);
+  Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GEOM_COPY);
 
   //Add a mirror function
   Handle(GEOM_Function) aFunction =
@@ -1113,7 +1113,7 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::OffsetShapeCopy
   if (anOriginal.IsNull()) return NULL; //There is no function which creates an object to be offset
 
   //Add a new Copy object
-  Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), GEOM_COPY);
+  Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GEOM_COPY);
 
   //Add a new Offset function
   Handle(GEOM_Function) aFunction =
@@ -1184,7 +1184,7 @@ GEOMImpl_ITransformOperations::ProjectShapeCopy (Handle(GEOM_Object) theSource,
   else
   {
     //Add a new Projection object
-    aCopy = GetEngine()->AddObject(GetDocID(), GEOM_PROJECTION);
+    aCopy = GetEngine()->AddObject(GEOM_PROJECTION);
 
     //Add a Projection function
     Handle(GEOM_Function) aFunction =
@@ -1248,7 +1248,7 @@ Standard_Real GEOMImpl_ITransformOperations::ProjectPointOnWire
   }
 
   //Add a new Projection object
-  thePointOnEdge = GetEngine()->AddObject(GetDocID(), GEOM_PROJECTION);
+  thePointOnEdge = GetEngine()->AddObject(GEOM_PROJECTION);
 
   //Add a Projection function
   Handle(GEOM_Function) aFunction = thePointOnEdge->AddFunction
@@ -1363,7 +1363,7 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::ScaleShapeCopy
   if (anOriginal.IsNull()) return NULL; //There is no function which creates an object to be scaled
 
   //Add a new Copy object
-  Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), GEOM_COPY);
+  Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GEOM_COPY);
 
   //Add a scale function
   Handle(GEOM_Function) aFunction =
@@ -1429,7 +1429,7 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::ScaleShapeAlongAxes (Handle(G
   Handle(GEOM_Object) aCopy;   //Add a new Copy object
   Handle(GEOM_Function) aFunction;
   if (doCopy) {
-    aCopy = GetEngine()->AddObject(GetDocID(), theObject->GetType());
+    aCopy = GetEngine()->AddObject(theObject->GetType());
     aFunction = aCopy->AddFunction(GEOMImpl_ScaleDriver::GetID(), SCALE_SHAPE_AXES_COPY);
   }
   else {
@@ -1554,7 +1554,7 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::PositionShapeCopy
   if (anOriginal.IsNull()) return NULL; //There is no function which creates an object to be set in position
 
   //Add a new Copy object
-  Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), GEOM_COPY);
+  Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GEOM_COPY);
 
   //Add a position function
   Standard_Integer aType = POSITION_SHAPE_COPY;
@@ -1616,7 +1616,7 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::PositionAlongPath
   Handle(GEOM_Object) aCopy;
 
   if (theCopy) {
-    aCopy = GetEngine()->AddObject(GetDocID(), theObject->GetType());
+    aCopy = GetEngine()->AddObject(theObject->GetType());
     aFunction = aCopy->AddFunction(GEOMImpl_PositionDriver::GetID(), POSITION_ALONG_PATH);
   }
   else
@@ -1733,7 +1733,7 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::RotateCopy (Handle(GEOM_Objec
   if (aLastFunction.IsNull()) return NULL;  //There is no function which creates an object to be rotated
 
   //Add a new Copy object
-  Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), GEOM_COPY);
+  Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GEOM_COPY);
 
   //Add a rotate function
   aFunction = aCopy->AddFunction(GEOMImpl_RotateDriver::GetID(), ROTATE_COPY);
@@ -1786,7 +1786,7 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::Rotate1D (Handle(GEOM_Object)
   if (aLastFunction.IsNull()) return NULL;  //There is no function which creates an object to be rotated
 
   //Add a new Copy object
-  Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), theObject->GetType());
+  Handle(GEOM_Object) aCopy = GetEngine()->AddObject(theObject->GetType());
 
   //Add a rotate function
   aFunction = aCopy->AddFunction(GEOMImpl_RotateDriver::GetID(), ROTATE_1D);
@@ -1841,7 +1841,7 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::Rotate1D (Handle(GEOM_Object)
   if (aLastFunction.IsNull()) return NULL;  //There is no function which creates an object to be rotated
 
   //Add a new Copy object
-  Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), theObject->GetType());
+  Handle(GEOM_Object) aCopy = GetEngine()->AddObject(theObject->GetType());
 
   //Add a rotate function
   aFunction = aCopy->AddFunction(GEOMImpl_RotateDriver::GetID(), ROTATE_1D_STEP);
@@ -1902,7 +1902,7 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::Rotate2D (Handle(GEOM_Object)
   if (aLastFunction.IsNull()) return NULL;  //There is no function which creates an object to be rotated
 
   //Add a new Copy object
-  Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), theObject->GetType());
+  Handle(GEOM_Object) aCopy = GetEngine()->AddObject(theObject->GetType());
 
   //Add a rotate function
   aFunction = aCopy->AddFunction(GEOMImpl_RotateDriver::GetID(), ROTATE_2D);
@@ -1965,7 +1965,7 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::Rotate2D (Handle(GEOM_Object)
   if (aLastFunction.IsNull()) return NULL; //There is no function which creates an object to be rotated
 
   //Add a new Copy object
-  Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), theObject->GetType());
+  Handle(GEOM_Object) aCopy = GetEngine()->AddObject(theObject->GetType());
 
   //Add a rotate function
   aFunction = aCopy->AddFunction(GEOMImpl_RotateDriver::GetID(), ROTATE_2D);
@@ -2087,7 +2087,7 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::RotateThreePointsCopy (Handle
   if (aLastFunction.IsNull()) return NULL;  //There is no function which creates an object to be rotated
 
   //Add a new Copy object
-  Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), GEOM_COPY);
+  Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GEOM_COPY);
 
   //Add a rotate function
   aFunction = aCopy->AddFunction(GEOMImpl_RotateDriver::GetID(), ROTATE_THREE_POINTS_COPY);
@@ -2144,7 +2144,7 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::TransformLikeOtherCopy
   if (aSampleFunc.IsNull()) return NULL; // There is no function which creates a sample object
 
   // Add a new Copy object
-  Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GetDocID(), GEOM_COPY);
+  Handle(GEOM_Object) aCopy = GetEngine()->AddObject(GEOM_COPY);
 
   // Add a transform function (depends on theSample function)
   Handle(GEOM_Function) aFunction =
@@ -2295,7 +2295,7 @@ Handle(GEOM_Object) GEOMImpl_ITransformOperations::MakeProjectionOnCylinder
 
   //Add a new Projection object
   Handle(GEOM_Object) aResult =
-    GetEngine()->AddObject(GetDocID(), GEOM_PROJECTION);
+    GetEngine()->AddObject(GEOM_PROJECTION);
 
   //Add a Projection function
   Handle(GEOM_Function) aFunction = aResult->AddFunction
index 46fb60dcbe7484a94d77dabfe9b8319004e9391c..c29d1c780e2512b5f90d5024e201c84684e6b048 100644 (file)
@@ -37,7 +37,7 @@ class GEOMImpl_IRotate;
 class GEOMImpl_ITransformOperations : public GEOM_IOperations
 {
  public:
-  Standard_EXPORT GEOMImpl_ITransformOperations(GEOM_Engine* theEngine, int theDocID);
+  Standard_EXPORT GEOMImpl_ITransformOperations(GEOM_Engine* theEngine);
   Standard_EXPORT ~GEOMImpl_ITransformOperations();
 
   Standard_EXPORT Handle(GEOM_Object) TranslateTwoPoints (Handle(GEOM_Object) theObject,
index 867845185d9843ca1efd5ee8efb27f3aaa10aba8..f512eabd558235f40b6965ff1603d9dbb7c57985 100644 (file)
@@ -69,7 +69,7 @@ Standard_Integer GEOMImpl_ImportDriver::Execute(LOGBOOK& log) const
     return 0;
 
   Handle(TColStd_HSequenceOfTransient) aSeq =
-    GEOMImpl_IECallBack::GetCallBack( aFormatName )->Import( GetDocID(), aFormatName, aFileName );
+    GEOMImpl_IECallBack::GetCallBack( aFormatName )->Import( aFormatName, aFileName );
   if( aSeq.IsNull() )
     return 0;
 
index a5e9d98fe3d11c21d9023e7f4a936f4664c922da..f5a2dd843a4141a177b041be1ce41b5be1dad843 100644 (file)
@@ -457,7 +457,7 @@ void GEOMToolsGUI::OnEditDelete()
   }
 
   _PTR(StudyBuilder) aStudyBuilder (aStudy->NewBuilder());
-  GEOM_Displayer* disp = new GEOM_Displayer( appStudy );
+  GEOM_Displayer* disp = new GEOM_Displayer();
 
   if ( isComponentSelected ) {
     // GEOM component is selected: delete all objects recursively
@@ -572,8 +572,7 @@ void GEOMToolsGUI::deactivate()
 {
   SalomeApp_Application* app = dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication() );
   if ( app ) {
-    SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
-    GEOM_Displayer aDisp (appStudy);
+    GEOM_Displayer aDisp;
     aDisp.GlobalSelection();
     getGeometryGUI()->setLocalSelectionMode(GEOM_ALLOBJECTS);
   }
index 5b4273c95d79eb549b4b12a5773092620e5f9a7a..28dc3571ebf5ff3e9387f382a5e14a2ead3c58bc 100644 (file)
@@ -168,7 +168,7 @@ void GEOMToolsGUI::OnAutoColor()
 
   QList<SALOMEDS::Color> aReservedColors;
 
-  GEOM_Displayer displayer ( appStudy );
+  GEOM_Displayer displayer;
 
   SALOME_View* window = displayer.GetActiveView();
   if ( !window ) return;
@@ -256,7 +256,7 @@ void GEOMToolsGUI::OnColor()
   aSelMgr->selectedObjects( selected );
   if ( selected.IsEmpty() ) return;
 
-  GEOM_Displayer displayer( appStudy );
+  GEOM_Displayer displayer;
 
   // get active view
   SALOME_View* window = displayer.GetActiveView();
@@ -308,7 +308,7 @@ void GEOMToolsGUI::OnTexture()
   aSelMgr->selectedObjects( selected );
   if ( selected.IsEmpty() ) return;
 
-  GEOM_Displayer displayer( appStudy );
+  GEOM_Displayer displayer;
   SALOME_View* window = displayer.GetActiveView();
   if ( !window ) return;
 
@@ -351,7 +351,7 @@ void GEOMToolsGUI::OnChangeTransparency( bool increase )
   aSelMgr->selectedObjects( selected );
   if ( selected.IsEmpty() ) return;
 
-  GEOM_Displayer displayer( appStudy );
+  GEOM_Displayer displayer;
   SALOME_View* window = displayer.GetActiveView();
   if ( !window ) return;
 
@@ -396,7 +396,7 @@ void GEOMToolsGUI::OnNbIsos( ActionType actionType )
   aSelMgr->selectedObjects( selected );
   if ( selected.IsEmpty() ) return;
 
-  GEOM_Displayer displayer( appStudy );
+  GEOM_Displayer displayer;
   SALOME_View* window = displayer.GetActiveView();
   if ( !window ) return;
  
@@ -466,7 +466,7 @@ void GEOMToolsGUI::OnDeflection()
   aSelMgr->selectedObjects( selected );
   if ( selected.IsEmpty() ) return;
 
-  GEOM_Displayer displayer( appStudy );
+  GEOM_Displayer displayer;
   SALOME_View* window = displayer.GetActiveView();
   if ( !window ) return;
 
@@ -496,8 +496,7 @@ void GEOMToolsGUI::OnSelectOnly(int mode)
 {
   SalomeApp_Application* app = dynamic_cast< SalomeApp_Application* >( SUIT_Session::session()->activeApplication() );
   if ( app ) {
-    SalomeApp_Study* appStudy = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
-    GEOM_Displayer aDisp (appStudy);
+    GEOM_Displayer aDisp;
     aDisp.GlobalSelection(mode);
     getGeometryGUI()->setLocalSelectionMode(mode);
   }
@@ -665,7 +664,7 @@ void GEOMToolsGUI::OnEdgeWidth()
   aSelMgr->selectedObjects( selected );
   if ( selected.IsEmpty() ) return;
 
-  GEOM_Displayer displayer( appStudy );
+  GEOM_Displayer displayer;
 
   SALOME_View* window = displayer.GetActiveView();
   if ( !window ) return;
@@ -708,7 +707,7 @@ void GEOMToolsGUI::OnIsosWidth() {
   aSelMgr->selectedObjects( selected );
   if ( selected.IsEmpty() ) return;
 
-  GEOM_Displayer displayer( appStudy );
+  GEOM_Displayer displayer;
 
   SALOME_View* window = displayer.GetActiveView();
   if ( !window ) return;
@@ -750,7 +749,7 @@ void GEOMToolsGUI::OnBringToFront() {
   aSelMgr->selectedObjects( selected );
   if ( selected.IsEmpty() ) return;
 
-  GEOM_Displayer displayer( appStudy );
+  GEOM_Displayer displayer;
 
   SALOME_View* window = displayer.GetActiveView();
   if ( !window ) return;
@@ -776,7 +775,7 @@ void GEOMToolsGUI::OnClsBringToFront() {
   SalomeApp_Study* appStudy = dynamic_cast< SalomeApp_Study* >( app->activeStudy() );
   if ( !appStudy ) return;
 
-  GEOM_Displayer displayer( appStudy );
+  GEOM_Displayer displayer;
 
   SALOME_View* window = displayer.GetActiveView();
   if ( !window ) return;
@@ -815,7 +814,7 @@ void GEOMToolsGUI::OnSetMaterial( const QVariant& theParam )
 
   if ( selected.IsEmpty() ) return;
   
-  GEOM_Displayer displayer( study );
+  GEOM_Displayer displayer;
 
   SALOME_View* window = displayer.GetActiveView();
   if ( !window ) return;
index 58a79a562488c0c23e50e7fb6ae805de73106991..1773209c1135ce900fa196b3bdb041d0da4eb231 100644 (file)
@@ -237,7 +237,7 @@ void GEOMToolsGUI_MarkerDlg::accept()
               }
             }
           }
-          GEOM_Displayer displayer( getStudy() );
+          GEOM_Displayer displayer;
           displayer.Redisplay( selected, true );
           selMgr->setSelectedObjects( selected );
         }
@@ -277,7 +277,7 @@ void GEOMToolsGUI_MarkerDlg::init()
   // ---
   
   GEOM::GEOM_Gen_var engine = GeometryGUI::GetGeomGen();
-  myOperation = engine->GetIInsertOperations( getStudy()->id() );
+  myOperation = engine->GetIInsertOperations();
   GEOM::ListOfLong_var ids = myOperation->GetAllTextures();
   for ( int i = 0; i < ids->length(); i++ )
     addTexture( ids[i] );
@@ -339,7 +339,7 @@ void GEOMToolsGUI_MarkerDlg::addTexture( int id, bool select ) const
   if ( id > 0 && myCustomTypeCombo->index( id ) == -1 ) {
     int tWidth, tHeight;
 
-    Handle(TColStd_HArray1OfByte) texture = GeometryGUI::getTexture(getStudy(), id, tWidth, tHeight);
+    Handle(TColStd_HArray1OfByte) texture = GeometryGUI::getTexture(id, tWidth, tHeight);
 
     if ( !texture.IsNull() && texture->Length() == tWidth*tHeight/8 ) {
       QImage image( tWidth, tHeight, QImage::Format_Mono );
index 0984331aaa94d46c3217217d39485870b38df33a..a6715a0ed57624992b224d48056723e0e81bf753 100644 (file)
@@ -141,22 +141,22 @@ GEOMToolsGUI_PublishDlg::~GEOMToolsGUI_PublishDlg()
     if ( appStudy ) {
       _PTR(Study) aStudy = appStudy->studyDS();
       if ( aStudy ) {
-       GEOM_Displayer displayer ( appStudy );
-       QTreeWidgetItemIterator it( myTreeWidget );
-       while ( *it ) {
-         QString entry = myEntryToItem.key( *it );
-         _PTR(SObject) SO ( aStudy->FindObjectID( qPrintable( entry ) ) );
-         if ( SO ) {
-           GEOM::GEOM_Object_var aGeomObject = GEOM::GEOM_Object::_narrow( GeometryGUI::ClientSObjectToObject( SO ) );
-           if ( CORBA::is_nil( aGeomObject ) ) continue;
-           if ( displayer.IsDisplayed( aGeomObject->GetStudyEntry() ) ) {
-             Handle(SALOME_InteractiveObject) io = new SALOME_InteractiveObject( aGeomObject->GetStudyEntry(), "GEOM", "" );
-             displayer.Erase( io );
+        GEOM_Displayer displayer;
+           QTreeWidgetItemIterator it( myTreeWidget );
+           while ( *it ) {
+             QString entry = myEntryToItem.key( *it );
+             _PTR(SObject) SO ( aStudy->FindObjectID( qPrintable( entry ) ) );
+             if ( SO ) {
+               GEOM::GEOM_Object_var aGeomObject = GEOM::GEOM_Object::_narrow( GeometryGUI::ClientSObjectToObject( SO ) );
+               if ( CORBA::is_nil( aGeomObject ) ) continue;
+               if ( displayer.IsDisplayed( aGeomObject->GetStudyEntry() ) ) {
+                 Handle(SALOME_InteractiveObject) io = new SALOME_InteractiveObject( aGeomObject->GetStudyEntry(), "GEOM", "" );
+                 displayer.Erase( io );
+               }
+             }
+             ++it;
            }
-         }
-         ++it;
-       }
-       displayer.UpdateViewer();
+           displayer.UpdateViewer();
       }
     }
   }
@@ -458,7 +458,7 @@ void GEOMToolsGUI_PublishDlg::onItemClicked(QTreeWidgetItem* theItem, int theCol
     if ( !SO ) return;
     GEOM::GEOM_Object_var aGeomObject = GEOM::GEOM_Object::_narrow( GeometryGUI::ClientSObjectToObject( SO ) );
     if ( CORBA::is_nil( aGeomObject ) ) return;
-    GEOM_Displayer displayer ( appStudy );
+    GEOM_Displayer displayer;
     SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
     Handle(SALOME_InteractiveObject) io = new SALOME_InteractiveObject( aGeomObject->GetStudyEntry(), "GEOM", "" );
     if ( displayer.IsDisplayed( aGeomObject->GetStudyEntry() ) ) {
index 3ae643a58025c71817ed2423fa2adf4392d313b9..f965bd210be26755bcd1a073fcf7a51a9d673d3a 100644 (file)
@@ -42,8 +42,7 @@
 #include <QMessageBox>
 
 GEOMToolsGUI_ReduceStudyDlg::GEOMToolsGUI_ReduceStudyDlg( QWidget* parent )
-:QDialog( parent, Qt::WindowTitleHint | Qt::WindowSystemMenuHint ),
-myDisplayer(NULL)
+:QDialog( parent, Qt::WindowTitleHint | Qt::WindowSystemMenuHint )
 {
   SUIT_ResourceMgr* resMgr = SUIT_Session::session()->resourceMgr();
   myVisible = QIcon( resMgr->loadPixmap( "SUIT", tr( "ICON_DATAOBJ_VISIBLE" ) ) );
@@ -53,7 +52,7 @@ myDisplayer(NULL)
   if ( !myApp ) return;
   SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*>( myApp->activeStudy() );
   myStudy = study->studyDS();
-  myDisplayer = GEOM_Displayer( study );
+  myDisplayer = GEOM_Displayer();
 
   setWindowTitle( tr( "GEOM_REDUCE_STUDY_TITLE" ) );
   setAttribute(Qt::WA_DeleteOnClose);
index 35254bf90b7ede81698a37f6d7986c724438c5d3..15f4ea8f9170cac1aba0caf1e5f8584640f9e6ac 100644 (file)
@@ -83,12 +83,11 @@ void ConvertV6toV7( TCollection_AsciiString& theScript )
 //purpose  : 
 //=======================================================================
 
-Engines::TMPFile* GEOM_Gen_i::DumpPython(CORBA::Object_ptr theStudy, 
-                                        CORBA::Boolean isPublished, 
-                                        CORBA::Boolean isMultiFile,
+Engines::TMPFile* GEOM_Gen_i::DumpPython(CORBA::Boolean isPublished,
+                                         CORBA::Boolean isMultiFile,
                                          CORBA::Boolean& isValidScript)
 {
-  SALOMEDS::Study_var aStudy = SALOMEDS::Study::_narrow(theStudy);
+  SALOMEDS::Study_var aStudy = GetStudy();
   if(CORBA::is_nil(aStudy))
     return new Engines::TMPFile(0);   
 
index 6b0f6ca44b659993699ef0403282e5c6e011f2b2..bd127842c0686c8b73e4da2cfc58cbd4581c519c 100644 (file)
@@ -69,8 +69,7 @@ GEOM::GEOM_Object_ptr GEOM_Field_i::GetShape()
   HANDLE_NAMESPACE(GEOM_Object) shape = _impl->GetShape();
   if ( !shape.IsNull() )
   {
-    GEOM::GEOM_BaseObject_var obj = _engine->GetObject( shape->GetDocID(),
-                                                        shape->GetEntryString().ToCString());
+    GEOM::GEOM_BaseObject_var obj = _engine->GetObject( shape->GetEntryString().ToCString());
     shapeVar = GEOM::GEOM_Object::_narrow( obj );
   }
   return shapeVar._retn();
@@ -138,8 +137,7 @@ GEOM::GEOM_FieldStep_ptr GEOM_Field_i::AddStep(::CORBA::Long stepID, ::CORBA::Lo
   HANDLE_NAMESPACE(GEOM_FieldStep) step = _impl->AddStep( stepID, stamp );
   if ( !step.IsNull() )
   {
-    GEOM::GEOM_BaseObject_var obj = _engine->GetObject( step->GetDocID(),
-                                                        step->GetEntryString().ToCString());
+    GEOM::GEOM_BaseObject_var obj = _engine->GetObject( step->GetEntryString().ToCString());
     stepVar = GEOM::GEOM_FieldStep::_narrow( obj );
   }
   return stepVar._retn();
@@ -201,8 +199,7 @@ GEOM::GEOM_FieldStep_ptr GEOM_Field_i::GetStep(CORBA::Long stepID)
   HANDLE_NAMESPACE(GEOM_FieldStep) step = _impl->GetStep(stepID);
   if ( !step.IsNull() )
   {
-    GEOM::GEOM_BaseObject_var obj = _engine->GetObject( step->GetDocID(),
-                                                        step->GetEntryString().ToCString());
+    GEOM::GEOM_BaseObject_var obj = _engine->GetObject( step->GetEntryString().ToCString());
     stepVar = GEOM::GEOM_FieldStep::_narrow( obj );
   }
   return stepVar._retn();
@@ -291,8 +288,7 @@ GEOM::GEOM_Field_ptr GEOM_FieldStep_i::GetField()
   HANDLE_NAMESPACE(GEOM_Field) field = _impl->GetField();
   if ( !field.IsNull() )
   {
-    GEOM::GEOM_BaseObject_var obj = _engine->GetObject( field->GetDocID(),
-                                                        field->GetEntryString().ToCString());
+    GEOM::GEOM_BaseObject_var obj = _engine->GetObject( field->GetEntryString().ToCString());
     fieldVar = GEOM::GEOM_Field::_narrow( obj );
   }
   return fieldVar._retn();
index dd3ec455ec8fe590e787d4d38ec592118eff5ad6..b01845065d869e09f80740aee624c4948a6d8c48 100644 (file)
@@ -171,7 +171,8 @@ char* GEOM_Gen_i::IORToLocalPersistentID(SALOMEDS::SObject_ptr theSObject,
 //          : Used when a study is loaded
 //          : The IOR (IORName) of object created is returned
 //============================================================================
-char* GEOM_Gen_i::LocalPersistentIDToIOR(const char* aLocalPersistentID,
+char* GEOM_Gen_i::LocalPersistentIDToIOR(SALOMEDS::SObject_ptr theSObject,
+                                         const char* aLocalPersistentID,
                                          CORBA::Boolean isMultiFile,
                                          CORBA::Boolean isASCII)
 {
@@ -181,7 +182,7 @@ char* GEOM_Gen_i::LocalPersistentIDToIOR(const char* aLocalPersistentID,
   {
     TCollection_AsciiString anEntry;
     TDF_Tool::Entry(anObject->GetEntry(), anEntry);
-    GEOM::GEOM_BaseObject_var obj = GetObject(anObject->GetDocID(), anEntry.ToCString());
+    GEOM::GEOM_BaseObject_var obj = GetObject(anEntry.ToCString());
 
     CORBA::String_var aPersRefString = _orb->object_to_string(obj);
     return CORBA::string_dup(aPersRefString);
@@ -419,7 +420,7 @@ SALOMEDS::SObject_ptr GEOM_Gen_i::PublishInStudy(SALOMEDS::SObject_ptr theSObjec
   //Set NoteBook variables used in the object creation
   TCollection_AsciiString aVars;
   CORBA::String_var aString=aBaseObj->GetParameters();
-  SALOMEDS::ListOfListOfStrings_var aSections = theStudy->ParseVariables(aString);
+  SALOMEDS::ListOfListOfStrings_var aSections = aStudy->ParseVariables(aString);
   for(int i = 0, n = aSections->length(); i < n; i++) {
     SALOMEDS::ListOfStrings aListOfVars = aSections[i];
     for(int j = 0, m = aListOfVars.length(); j < m; j++) {
@@ -474,7 +475,7 @@ void GEOM_Gen_i::CreateAndPublishGroup(GEOM::GEOM_Object_var theMainShape,
       Standard_Integer anIndex = anIndices.FindIndex(aValue);
       //anArray->SetValue(1, anIndex);
       GOp->AddObject(GrObj,anIndex);
-      //anObj = GEOM_Engine::GetEngine()->AddObject(aMainShape->GetDocID(), GEOM_SUBSHAPE);
+      //anObj = GEOM_Engine::GetEngine()->AddObject(GEOM_SUBSHAPE);
       //if (anObj.IsNull()) continue;
       //HANDLE_NAMESPACE(GEOM_Function) aFunction = anObj->AddFunction(GEOM_Object::GetSubShapeID(), 1);
       //if (aFunction.IsNull()) continue;
@@ -486,8 +487,8 @@ void GEOM_Gen_i::CreateAndPublishGroup(GEOM::GEOM_Object_var theMainShape,
       //SALOMEDS::SObject_var aResultSO;
       //TCollection_AsciiString anEntry;
       //TDF_Tool::Entry(anObj->GetEntry(),anEntry);
-      //GEOM::GEOM_Object_var aGObj = GetObject(anObj->GetDocID(), anEntry.ToCString());
-      //AddInStudy(theStudy, aGObj._retn(), SeqN.Value(i).ToCString(), GrObj);
+      //GEOM::GEOM_Object_var aGObj = GetObject(anEntry.ToCString());
+      //AddInStudy(aGObj._retn(), SeqN.Value(i).ToCString(), GrObj);
     }
   }
 }
@@ -730,7 +731,7 @@ CORBA::Boolean GEOM_Gen_i::LoadASCII(SALOMEDS::SComponent_ptr theComponent,
 // function : Close()
 // purpose  :
 //============================================================================
-void GEOM_Gen_i::Close()
+void GEOM_Gen_i::Close(SALOMEDS::SComponent_ptr theComponent)
 {
   _impl->Close();
 }
@@ -826,7 +827,7 @@ SALOMEDS::SObject_ptr GEOM_Gen_i::PasteInto(const SALOMEDS::TMPFile& theStream,
 
   TCollection_AsciiString anEntry;
   TDF_Tool::Entry(anObj->GetEntry(), anEntry);
-  GEOM::GEOM_BaseObject_var obj = GetObject(anObj->GetDocID(), anEntry.ToCString());
+  GEOM::GEOM_BaseObject_var obj = GetObject(anEntry.ToCString());
 
   //Set the study entry of the published GEOM_Object
   obj->SetStudyEntry(aNewSO->GetID());
@@ -865,7 +866,7 @@ SALOMEDS::SObject_ptr GEOM_Gen_i::AddInStudy (GEOM::GEOM_BaseObject_ptr theObjec
 {
   SALOMEDS::SObject_var aResultSO;
   SALOMEDS::Study_var aStudy = GetStudy();
-  if(theObject->_is_nil() || theStudy->_is_nil()) return aResultSO;
+  if(theObject->_is_nil() || aStudy->_is_nil()) return aResultSO;
 
   SALOMEDS::StudyBuilder_var aStudyBuilder = aStudy->NewBuilder();
   CORBA::String_var IOR;
@@ -951,7 +952,7 @@ GEOM::ListOfGO* GEOM_Gen_i::RestoreGivenSubShapesO (GEOM::GEOM_Object_ptr   theO
 
   // find SObject in the study if it is already published
   CORBA::String_var anIORo = _orb->object_to_string(theObject);
-  SALOMEDS::SObject_var aSO = theStudy->FindObjectIOR(anIORo.in());
+  SALOMEDS::SObject_var aSO = GetStudy()->FindObjectIOR(anIORo.in());
   //PTv, IMP 0020001, The salome object <aSO>
   // is not obligatory in case of invokation from script
   // if (CORBA::is_nil(aSO))
@@ -2567,7 +2568,7 @@ GEOM::GEOM_Object_ptr GEOM_Gen_i::AddSubShape (GEOM::GEOM_Object_ptr   theMainSh
 
   TCollection_AsciiString anEntry;
   TDF_Tool::Entry(anObject->GetEntry(), anEntry);
-  return GEOM::GEOM_Object::_narrow( GetObject(anObject->GetDocID(), anEntry.ToCString()));
+  return GEOM::GEOM_Object::_narrow( GetObject(anEntry.ToCString()));
 }
 
 //=============================================================================
index 003abfaa6eccd97bb26d197b54cdaede64b0d15d..b7119922008d41c22defb8a5af3dc37efe22285e 100644 (file)
@@ -131,7 +131,7 @@ GEOM_IOperations_i::GetBaseObject(HANDLE_NAMESPACE(GEOM_BaseObject) theObject)
   if (theObject.IsNull()) return GO._retn();
   TCollection_AsciiString anEntry;
   TDF_Tool::Entry(theObject->GetEntry(), anEntry);
-  GO = _engine->GetObject(theObject->GetDocID(), (char*) anEntry.ToCString());
+  GO = _engine->GetObject((char*) anEntry.ToCString());
   return GO._retn();
 }
 
index 5ba47b14a42c5b5b6104677ea7e9d1770fa3813f..7c554c7959647a0c25df05ed2498560e619a9dc6 100644 (file)
@@ -178,7 +178,7 @@ char* GEOM_Object_i::GetSubShapeName(CORBA::Long subID)
   {
     TCollection_AsciiString anEntry = anIt.Value();
     HANDLE_NAMESPACE(GEOM_BaseObject) anObj =
-      GEOM_Engine::GetEngine()->GetObject( _impl->GetDocID(), anEntry.ToCString(), false );
+      GEOM_Engine::GetEngine()->GetObject( anEntry.ToCString(), false );
     if ( anObj.IsNull() ) continue;
 
     TCollection_AsciiString aSubName = anObj->GetName();
index 3b2f724c6d05b9a2b50589d69cbd3f36351289c1..ac0d831f88955e83988ca7c7dd89f57dbeac0c55 100644 (file)
@@ -891,10 +891,10 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
             """
             # Example: see GEOM_TestAll.py
             try:
-                aSObject = self.AddInStudy(self.myStudy, aShape, aName, None)
+                aSObject = self.AddInStudy(aShape, aName, None)
                 if aSObject and aName: aSObject.SetAttrString("AttributeName", aName)
                 if doRestoreSubShapes:
-                    self.RestoreSubShapesSO(self.myStudy, aSObject, theArgs,
+                    self.RestoreSubShapesSO(aSObject, theArgs,
                                             theFindMethod, theInheritFirstArg, True )
             except:
                 print "addToStudy() failed"
@@ -1010,7 +1010,7 @@ class geomBuilder(object, GEOM._objref_GEOM_Gen):
                 list of published sub-shapes
             """
             # Example: see GEOM_TestAll.py
-            return self.RestoreSubShapesO(self.myStudy, theObject, theArgs,
+            return self.RestoreSubShapesO(theObject, theArgs,
                                           theFindMethod, theInheritFirstArg, theAddPrefix)
 
         ## Publish sub-shapes, standing for arguments and sub-shapes of arguments
index 7a0e4450d9130d6dbb6b9bef15692ba5a63eab56..9ecc7722e17185d44c17b12ede0f5db018b875fa 100644 (file)
@@ -124,14 +124,9 @@ void GEOM_Swig::createAndDisplayGO( const char* theEntry, bool theUpdateViewer )
     {}
     virtual void Execute()
     {
-      SUIT_Application* app = SUIT_Session::session()->activeApplication();
-      if ( !app ) return;
-      SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
-      if ( !study ) return;
-
       Handle(SALOME_InteractiveObject) io = new SALOME_InteractiveObject( myEntry.c_str(), "GEOM", "" );
 
-      GEOM_Displayer( study ).Display( io, myUpdateViewer );
+      GEOM_Displayer().Display( io, myUpdateViewer );
     }
   };
 
@@ -186,14 +181,9 @@ void GEOM_Swig::eraseGO( const char* theEntry, bool theUpdateViewer )
     {}
     virtual void Execute()
     {
-      SUIT_Application* app = SUIT_Session::session()->activeApplication();
-      if ( !app ) return;
-      SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
-      if ( !study ) return;
-
       Handle(SALOME_InteractiveObject) io = new SALOME_InteractiveObject( myEntry.c_str(), "GEOM", "" );
 
-      GEOM_Displayer( study ).Erase( io, true, myUpdateViewer );
+      GEOM_Displayer().Erase( io, true, myUpdateViewer );
     }
   };
 
@@ -212,13 +202,7 @@ void GEOM_Swig::UpdateViewer()
     {}
     virtual void Execute()
     {
-      SUIT_Application* app = SUIT_Session::session()->activeApplication();
-      if ( !app ) return;
-
-      SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
-      if ( !study ) return;
-      
-      GEOM_Displayer( study ).UpdateViewer();
+      GEOM_Displayer().UpdateViewer();
     }
   };
   
@@ -354,7 +338,7 @@ void TSetPropertyEvent::Execute()
   SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*>( app->activeStudy() );
   if ( !study ) return;
   
-  GEOM_Displayer displayer( study );
+  GEOM_Displayer displayer;
   
   SALOME_View* window = displayer.GetActiveView();
   if ( !window ) return;
index c0c21aa0e04e89afd65720d075217ea4142f74e2..e02b2c498b160b70170d7568d8877d2bf9e356ae 100644 (file)
@@ -642,8 +642,7 @@ bool GenerationGUI_PipeDlg::extractPrefix() const
 // purpose  : virtual method to restore tree of argument's sub-shapes under
 //            the resulting shape. Redefined from GEOMBase_Helper class.
 //=================================================================================
-void GenerationGUI_PipeDlg::restoreSubShapes
-              (SALOMEDS::Study_ptr theStudy, SALOMEDS::SObject_ptr theSObject)
+void GenerationGUI_PipeDlg::restoreSubShapes(SALOMEDS::SObject_ptr theSObject)
 {
   QCheckBox *aGenGroupCheck = NULL;
   QLineEdit *aPrefixEdit    = NULL;
@@ -691,8 +690,7 @@ void GenerationGUI_PipeDlg::restoreSubShapes
       }
 
       aName += tr((*it)->GetName());
-      getGeomEngine()->AddInStudy(theStudy, (*it).get(),
-                                  aName.toStdString().c_str(), aFather);
+      getGeomEngine()->AddInStudy((*it).get(), aName.toStdString().c_str(), aFather);
     }
   }
 }
index c9b2f0833588b9c14e1fc466a6ad0f0f2581f277..1e7f53e6e3013b0d4d014150ac1ecbb650735ac9 100644 (file)
@@ -55,8 +55,7 @@ protected:
   virtual bool                       execute( ObjectList& );    
   virtual void                       addSubshapesToStudy();
   virtual bool                       extractPrefix() const;
-  virtual void                       restoreSubShapes
-                                 (SALOMEDS::Study_ptr, SALOMEDS::SObject_ptr);
+  virtual void                       restoreSubShapes(SALOMEDS::SObject_ptr);
   virtual QList<GEOM::GeomObjPtr>    getSourceObjects();
 
 private:
index ba8b743e1e7c54644192362f6f36b7686796b000..78bfd9b1454a0b68a6f574b44e109a7936415e49 100644 (file)
@@ -107,8 +107,6 @@ bool IGESPlugin_GUI::importIGES( SUIT_Desktop* parent )
 {
   SalomeApp_Application* app = getGeometryGUI()->getApp();
   if ( !app ) return false;
-  SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*> ( app->activeStudy() );
-  if ( !study ) return false;
 
   GEOM::GEOM_IOperations_var op = GeometryGUI::GetGeomGen()->GetPluginOperations( "IGESPluginEngine" );
   IGESOpPtr igesOp = GEOM::IIGESOperations::_narrow( op );
@@ -182,7 +180,7 @@ bool IGESPlugin_GUI::importIGES( SUIT_Desktop* parent )
          
          entryList.append( so->GetID() );
          transaction.commit();
-         GEOM_Displayer( study ).Display( main.in() );
+         GEOM_Displayer().Display( main.in() );
           main->UnRegister();
        }
        else
index 0bca95a5deec7432e422ce84eb2cee8362ff0842..9fda7a6b6a4199595bd2cba63e5064245175c765 100755 (executable)
@@ -45,12 +45,11 @@ IGESPlugin_IECallBack::~IGESPlugin_IECallBack()
  *  Export
  */
 //=============================================================================
-bool IGESPlugin_IECallBack::Export( int                            theDocId,
-                                   const Handle(GEOM_Object)      theOriginal,
-                                   const TCollection_AsciiString& theFileName,
-                                   const TCollection_AsciiString& theFormatName )
+bool IGESPlugin_IECallBack::Export( const Handle(GEOM_Object)      theOriginal,
+                                    const TCollection_AsciiString& theFileName,
+                                    const TCollection_AsciiString& theFormatName )
 {
-  IGESPlugin_IOperations* aPluginOperations = IGESPlugin_OperationsCreator::get( GetEngine(), theDocId );
+  IGESPlugin_IOperations* aPluginOperations = IGESPlugin_OperationsCreator::get( GetEngine() );
   TCollection_AsciiString aVersion = ( theFormatName == "IGES_5_3" ) ? "5.3" : "5.1";
   aPluginOperations->ExportIGES( theOriginal, theFileName, aVersion );
   return true;
@@ -62,11 +61,10 @@ bool IGESPlugin_IECallBack::Export( int                            theDocId,
  */
 //=============================================================================
 Handle(TColStd_HSequenceOfTransient)
-IGESPlugin_IECallBack::Import( int                            theDocId,
-                              const TCollection_AsciiString& theFormatName,
-                              const TCollection_AsciiString& theFileName )
+IGESPlugin_IECallBack::Import( const TCollection_AsciiString& theFormatName,
+                               const TCollection_AsciiString& theFileName )
 {
-  IGESPlugin_IOperations* aPluginOperations = IGESPlugin_OperationsCreator::get( GetEngine(), theDocId );
+  IGESPlugin_IOperations* aPluginOperations = IGESPlugin_OperationsCreator::get( GetEngine() );
   bool anIsIgnoreUnits = ( theFormatName == "IGES_SCALE" ) ? true : false;
   return aPluginOperations->ImportIGES( theFileName, anIsIgnoreUnits );
 }
@@ -77,11 +75,10 @@ IGESPlugin_IECallBack::Import( int                            theDocId,
  */
 //=============================================================================
 TCollection_AsciiString
-IGESPlugin_IECallBack::ReadValue( int                            theDocId,
-                                 const TCollection_AsciiString& theFileName,
-                                 const TCollection_AsciiString& theFormatName,
-                                 const TCollection_AsciiString& theParameterName )
+IGESPlugin_IECallBack::ReadValue( const TCollection_AsciiString& theFileName,
+                                  const TCollection_AsciiString& theFormatName,
+                                  const TCollection_AsciiString& theParameterName )
 {
-  IGESPlugin_IOperations* aPluginOperations = IGESPlugin_OperationsCreator::get( GetEngine(), theDocId );
+  IGESPlugin_IOperations* aPluginOperations = IGESPlugin_OperationsCreator::get( GetEngine() );
   return aPluginOperations->ReadValue( theFileName, theParameterName );
 }
index 716d55a1be6decbd71f19968d31deb0c1d136926..dde69bdcfb4e33b5a0fc369b7d4c25815c794a36 100644 (file)
@@ -36,17 +36,14 @@ public:
   IGESPlugin_IECallBack();
   ~IGESPlugin_IECallBack();
   
-  bool         Export( int                            theDocId,
-                      const Handle(GEOM_Object)      theOriginal,
-                      const TCollection_AsciiString& theFileName,
+  bool Export( const Handle(GEOM_Object)      theOriginal,
+               const TCollection_AsciiString& theFileName,
                       const TCollection_AsciiString& theFormatName );
   
-  Handle(TColStd_HSequenceOfTransient) Import( int                            theDocId,
-                                              const TCollection_AsciiString& theFormatName,
-                                              const TCollection_AsciiString& theFileName );
+  Handle(TColStd_HSequenceOfTransient) Import( const TCollection_AsciiString& theFormatName,
+                                                                  const TCollection_AsciiString& theFileName );
   
-  TCollection_AsciiString  ReadValue( int                            theDocId,
-                                     const TCollection_AsciiString& theFileName,
+  TCollection_AsciiString  ReadValue( const TCollection_AsciiString& theFileName,
                                       const TCollection_AsciiString& theFormatName,
                                       const TCollection_AsciiString& theParameterName );
 };
index c53752cf48218ff9d83fcd3c48f5545debd89749..1857d6a6b071dbb72ced3f4716e19ca018aaed90 100644 (file)
@@ -38,8 +38,8 @@
  *  Constructor
  */
 //=============================================================================
-IGESPlugin_IOperations::IGESPlugin_IOperations( GEOM_Engine* theEngine, int theDocID )
-: GEOMImpl_IBaseIEOperations( theEngine, theDocID )
+IGESPlugin_IOperations::IGESPlugin_IOperations( GEOM_Engine* theEngine )
+: GEOMImpl_IBaseIEOperations( theEngine )
 {
   MESSAGE( "IGESPlugin_IOperations::IGESPlugin_IOperations" );
 }
@@ -77,7 +77,7 @@ void IGESPlugin_IOperations::ExportIGES( const Handle(GEOM_Object)      theOrigi
   if( aRefFunction.IsNull() ) return;  //There is no function which creates an object to be exported
 
   //Add a new result object
-  Handle(GEOM_Object) result = GetEngine()->AddObject( GetDocID(), GEOM_IMPORT);
+  Handle(GEOM_Object) result = GetEngine()->AddObject( GEOM_IMPORT);
 
   //Add an Export function
   Handle(GEOM_Function) aFunction = result->AddFunction( IGESPlugin_ExportDriver::GetID(), EXPORT_SHAPE );
@@ -129,7 +129,7 @@ IGESPlugin_IOperations::ImportIGES( const TCollection_AsciiString& theFileName,
   if( theFileName.IsEmpty() ) return NULL;
 
   //Add a new result object
-  Handle(GEOM_Object) anImported = GetEngine()->AddObject( GetDocID(), GEOM_IMPORT );
+  Handle(GEOM_Object) anImported = GetEngine()->AddObject( GEOM_IMPORT );
 
   //Add an Import function
   Handle(GEOM_Function) aFunction =
index 0fea3f36b05115aa15902b0468f8d56b9e8c59e3..5573a210bca40151c23b2ed1db86498a8eb3b598 100644 (file)
@@ -30,7 +30,7 @@
 class IGESPLUGINENGINE_EXPORT IGESPlugin_IOperations: public GEOMImpl_IBaseIEOperations
 {
 public:
-  IGESPlugin_IOperations( GEOM_Engine*, int );
+  IGESPlugin_IOperations( GEOM_Engine* );
   ~IGESPlugin_IOperations();
 
   void ExportIGES( const Handle(GEOM_Object),
index e2f964390dec9da9a5bab6bd1968054287af80dd..9f33d8323817aa3a3edcfaa1eb1ec87d16b93da7 100644 (file)
@@ -59,11 +59,12 @@ GEOM_IOperations_i* IGESPlugin_OperationsCreator::Create( PortableServer::POA_pt
 {
   Unexpect aCatch( SALOME_SalomeException );
   MESSAGE( "IGESPlugin_OperationsCreator::Create" );
-  _operation = new IGESPlugin_IOperations( theGenImpl );
-  return new IGESPlugin_IOperations_i( thePOA, theEngine, _operation );
+  return new IGESPlugin_IOperations_i( thePOA, theEngine, get( theGenImpl ) );
 }
 
-IGESPlugin_IOperations* IGESPlugin_OperationsCreator::get()
+IGESPlugin_IOperations* IGESPlugin_OperationsCreator::get( ::GEOMImpl_Gen* theGenImpl )
 {
+  if( !_operation )
+    _operation = new IGESPlugin_IOperations( theGenImpl );
   return _operation;
 }
index 066bcb543c97de8500d6b205c438ed1c2008c4b5..ea3270481ca09839420960ceae25e6e617280f7b 100755 (executable)
@@ -44,10 +44,10 @@ public:
                                          GEOM::GEOM_Gen_ptr      theEngine,
                                          ::GEOMImpl_Gen*         theGenImpl );
 private:
-  static IGESPlugin_IOperations* get();
+  static IGESPlugin_IOperations* get(::GEOMImpl_Gen* theGenImpl);
 
 private:
-  IGESPlugin_IOperations*  _operation;
+  static IGESPlugin_IOperations* _operation;
 
   friend class IGESPlugin_IECallBack;
 };
index 38a6f3be71dbdd6152e3fe3d380825664adeabad..7547b4266b62f9d185375869ee27a6e19d62c018 100644 (file)
@@ -178,8 +178,8 @@ void MeasureGUI::ChangeDimensionsVisibility( const bool theIsVisible )
     return;
   }
 
-  SalomeApp_Study* anActiveStudy = dynamic_cast<SalomeApp_Study*>( anApp->activeStudy() );
-  if ( !anActiveStudy )
+  SalomeApp_Study* aStudy = dynamic_cast<SalomeApp_Study*>( anApp->activeStudy() );
+  if ( !aStudy )
   {
     return;
   }
@@ -205,16 +205,16 @@ void MeasureGUI::ChangeDimensionsVisibility( const bool theIsVisible )
 
   SUIT_OverrideCursor wc;
 
-  GEOMGUI_DimensionProperty aDimensions( anActiveStudy, anIObject->getEntry() );
+  GEOMGUI_DimensionProperty aDimensions( aStudy, anIObject->getEntry() );
 
   for ( int anIt = 0; anIt < aDimensions.GetNumber(); ++anIt )
   {
     aDimensions.SetVisible( anIt, theIsVisible );
   }
 
-  aDimensions.SaveToAttribute( anActiveStudy, anIObject->getEntry() );
+  aDimensions.SaveToAttribute( aStudy, anIObject->getEntry() );
 
-  GEOM_Displayer( anActiveStudy ).Redisplay( anIObject, true );
+  GEOM_Displayer().Redisplay( anIObject, true );
 }
 
 //=======================================================================
index 8aa674d3ed18af8b6d36fed7c733c3d62f27486f..387648140ee173a1fb8b8ab774b2e462331d25a5 100644 (file)
@@ -363,7 +363,7 @@ bool MeasureGUI_Skeleton::isValid( QString& )
 GEOM_Displayer* MeasureGUI_Skeleton::getDisplayer()
 {
   if ( !myDisplayer )
-    myDisplayer = new GEOM_Displayer( getStudy() );
+    myDisplayer = new GEOM_Displayer();
   return myDisplayer;
 }
 
index 446d7256491a61665502f7c31edaf4b0ede588cb..fa5bdbfdfe39d293300dc1e00d1042ac29837a73 100644 (file)
@@ -505,12 +505,11 @@ bool OperationGUI_PartitionDlg::execute (ObjectList& objects)
 // function : restoreSubShapes
 // purpose  :
 //=================================================================================
-void OperationGUI_PartitionDlg::restoreSubShapes( SALOMEDS::Study_ptr   theStudy,
-                                                  SALOMEDS::SObject_ptr theSObject )
+void OperationGUI_PartitionDlg::restoreSubShapes( SALOMEDS::SObject_ptr theSObject )
 {
   if ( mainFrame()->CheckBoxRestoreSS->isChecked() ) {
     // empty list of arguments means that all arguments should be restored
-    getGeomEngine()->RestoreSubShapesSO( theStudy, theSObject, GEOM::ListOfGO(),
+    getGeomEngine()->RestoreSubShapesSO( theSObject, GEOM::ListOfGO(),
                                          /*theFindMethod=*/GEOM::FSM_GetInPlaceByHistory,
                                          /*theInheritFirstArg=*/myListShapes.length() == 1 && myListTools.length() == 0,
                                          mainFrame()->CheckBoxAddPrefix->isChecked() ); // ? false
index 294a8d554688661bb291b314de34ca58fd7a3433..11065a223397aed466efda6319c6e91bbc68a963 100644 (file)
@@ -50,7 +50,7 @@ protected:
   virtual GEOM::GEOM_IOperations_ptr createOperation();
   virtual bool                       isValid( QString& );
   virtual bool                       execute( ObjectList& );
-  virtual void                       restoreSubShapes( SALOMEDS::Study_ptr, SALOMEDS::SObject_ptr );
+  virtual void                       restoreSubShapes( SALOMEDS::SObject_ptr );
   virtual QList<GEOM::GeomObjPtr>    getSourceObjects();
 
 private:
index cfb765be3a93e39d8c95bae3a6d8245046aea6b9..73c99830e4426ce752f6250cbbb257ac6208af6d 100644 (file)
@@ -364,7 +364,7 @@ bool RepairGUI_FreeFacesDlg::execute( ObjectList& objects )
 GEOM_Displayer* RepairGUI_FreeFacesDlg::getDisplayer()
 {
   if ( !myDisplayer )
-    myDisplayer = new GEOM_Displayer( getStudy() );
+    myDisplayer = new GEOM_Displayer();
   return myDisplayer;
 }
 
index cf2472ab8c39506ab2a6e696593495b0c5e6e150..9e789f72cbf0be5aa1220eab83607976e27ed5f6 100644 (file)
@@ -542,8 +542,7 @@ bool RepairGUI_GlueDlg::execute(ObjectList& objects)
 // function : restoreSubShapes
 // purpose  :
 //=================================================================================
-void RepairGUI_GlueDlg::restoreSubShapes(SALOMEDS::Study_ptr   theStudy,
-                                          SALOMEDS::SObject_ptr theSObject)
+void RepairGUI_GlueDlg::restoreSubShapes( SALOMEDS::SObject_ptr theSObject)
 {
   if (mainFrame()->CheckBoxRestoreSS->isChecked()) {
     GEOM::find_shape_method aFindMethod = GEOM::FSM_GetInPlace;
@@ -551,7 +550,7 @@ void RepairGUI_GlueDlg::restoreSubShapes(SALOMEDS::Study_ptr   theStudy,
       aFindMethod = GEOM::FSM_GetInPlaceByHistory;
 
     // empty list of arguments means that all arguments should be restored
-    getGeomEngine()->RestoreSubShapesSO(theStudy, theSObject, GEOM::ListOfGO(),
+    getGeomEngine()->RestoreSubShapesSO( theSObject, GEOM::ListOfGO(),
                                          aFindMethod, /*theInheritFirstArg=*/true,
                                          mainFrame()->CheckBoxAddPrefix->isChecked());
   }
index bf8ff96b5d60c706bd4952a1bd26e3b440ccef2a..92321bdc7ac8bcd36cf76b86b592d4cbade6c8f0 100644 (file)
@@ -55,7 +55,7 @@ protected:
   virtual GEOM::GEOM_IOperations_ptr createOperation();
   virtual bool                       isValid (QString&);
   virtual bool                       execute (ObjectList&);
-  virtual void                       restoreSubShapes (SALOMEDS::Study_ptr, SALOMEDS::SObject_ptr);
+  virtual void                       restoreSubShapes (SALOMEDS::SObject_ptr);
   virtual QList<GEOM::GeomObjPtr>    getSourceObjects();
 
 private:
index be7990f2f62f573cb55dc60ac7ca40f18454d090..554c68c9ef11a6d9c6e83702b9e27eb3d7e12adb 100644 (file)
@@ -433,12 +433,11 @@ void RepairGUI_LimitToleranceDlg::updateButtonState()
 // function : restoreSubShapes
 // purpose  :
 //=================================================================================
-void RepairGUI_LimitToleranceDlg::restoreSubShapes(SALOMEDS::Study_ptr   theStudy,
-                                                   SALOMEDS::SObject_ptr theSObject)
+void RepairGUI_LimitToleranceDlg::restoreSubShapes(SALOMEDS::SObject_ptr theSObject)
 {
   if (mainFrame()->CheckBoxRestoreSS->isChecked()) {
     // empty list of arguments means that all arguments should be restored
-    getGeomEngine()->RestoreSubShapesSO(theStudy, theSObject, GEOM::ListOfGO(),
+    getGeomEngine()->RestoreSubShapesSO(theSObject, GEOM::ListOfGO(),
                                         GEOM::FSM_GetInPlace, /*theInheritFirstArg=*/true,
                                         mainFrame()->CheckBoxAddPrefix->isChecked());
   }
index 5ec1ab29f92faf4e1f5c24d9af1d8ad6f3e67688..53ef961e816d212b7ab46e48165993c1044d1d79 100644 (file)
@@ -48,7 +48,7 @@ protected:
   virtual GEOM::GEOM_IOperations_ptr createOperation();
   virtual bool                       isValid (QString&);
   virtual bool                       execute (ObjectList&);
-  virtual void                       restoreSubShapes (SALOMEDS::Study_ptr, SALOMEDS::SObject_ptr);
+  virtual void                       restoreSubShapes (SALOMEDS::SObject_ptr);
   virtual QList<GEOM::GeomObjPtr>    getSourceObjects();
 
 private:
index 81587600170d4c7c82be3c3c0cf735c853f00bf8..09a2975d81a8049f3153a6aa0731c217a28c412c 100644 (file)
@@ -303,12 +303,11 @@ bool RepairGUI_RemoveExtraEdgesDlg::execute( ObjectList& objects )
 // function : restoreSubShapes
 // purpose  :
 //=================================================================================
-void RepairGUI_RemoveExtraEdgesDlg::restoreSubShapes( SALOMEDS::Study_ptr   theStudy,
-                                                      SALOMEDS::SObject_ptr theSObject )
+void RepairGUI_RemoveExtraEdgesDlg::restoreSubShapes( SALOMEDS::SObject_ptr theSObject )
 {
   if ( mainFrame()->CheckBoxRestoreSS->isChecked() ) {
     // empty list of arguments means that all arguments should be restored
-    getGeomEngine()->RestoreSubShapesSO( theStudy, theSObject, GEOM::ListOfGO(),
+    getGeomEngine()->RestoreSubShapesSO( theSObject, GEOM::ListOfGO(),
                                          /*theFindMethod=*/GEOM::FSM_GetInPlace, // ? GetInPlaceByHistory
                                          /*theInheritFirstArg=*/true,
                                          mainFrame()->CheckBoxAddPrefix->isChecked() );
index c14ed88c2749b3cd323185d1a221b2bfeda62dac..83e3eb74abacb29fabc835e0dd0bad9487fbfba3 100644 (file)
@@ -45,7 +45,7 @@ protected:
   virtual GEOM::GEOM_IOperations_ptr createOperation();
   virtual bool                       isValid( QString& );
   virtual bool                       execute( ObjectList& );    
-  virtual void                       restoreSubShapes( SALOMEDS::Study_ptr, SALOMEDS::SObject_ptr );
+  virtual void                       restoreSubShapes( SALOMEDS::SObject_ptr );
   virtual QList<GEOM::GeomObjPtr>    getSourceObjects();
 
 private:
index 7dcbadc4979c82352611c6d1150e1e87349a86ce..e679ba1bbc34b4f4207388c90834dccbf3dcfc78 100755 (executable)
@@ -272,12 +272,11 @@ bool RepairGUI_RemoveWebsDlg::execute (ObjectList& objects)
 // function : restoreSubShapes
 // purpose  :
 //=================================================================================
-void RepairGUI_RemoveWebsDlg::restoreSubShapes (SALOMEDS::Study_ptr   theStudy,
-                                                SALOMEDS::SObject_ptr theSObject)
+void RepairGUI_RemoveWebsDlg::restoreSubShapes (SALOMEDS::SObject_ptr theSObject)
 {
   if (mainFrame()->CheckBoxRestoreSS->isChecked()) {
     // empty list of arguments means that all arguments should be restored
-    getGeomEngine()->RestoreSubShapesSO(theStudy, theSObject, GEOM::ListOfGO(),
+    getGeomEngine()->RestoreSubShapesSO(theSObject, GEOM::ListOfGO(),
                                         /*theFindMethod=*/GEOM::FSM_GetInPlace, // ? GetInPlaceByHistory
                                         /*theInheritFirstArg=*/true,
                                         mainFrame()->CheckBoxAddPrefix->isChecked());
index a5ce390bef43519d88fd07c83191d17f8ff0f0a9..71e55acf6c155927632a9190974bae42904ef82b 100755 (executable)
@@ -44,7 +44,7 @@ protected:
   virtual GEOM::GEOM_IOperations_ptr createOperation();
   virtual bool                       isValid (QString&);
   virtual bool                       execute (ObjectList&);
-  virtual void                       restoreSubShapes (SALOMEDS::Study_ptr, SALOMEDS::SObject_ptr);
+  virtual void                       restoreSubShapes (SALOMEDS::SObject_ptr);
   virtual QList<GEOM::GeomObjPtr>    getSourceObjects();
 
 private:
index 8f944bf57f3fd57f1e3bb3dec1d2c5386927043b..b34504186c670ab573dd5ca2c25c0daf53ec29b1 100644 (file)
@@ -414,12 +414,11 @@ void RepairGUI_SuppressFacesDlg::initSelection()
 // function : restoreSubShapes
 // purpose  :
 //=================================================================================
-void RepairGUI_SuppressFacesDlg::restoreSubShapes (SALOMEDS::Study_ptr   theStudy,
-                                                   SALOMEDS::SObject_ptr theSObject)
+void RepairGUI_SuppressFacesDlg::restoreSubShapes (SALOMEDS::SObject_ptr theSObject)
 {
   if (mainFrame()->CheckBoxRestoreSS->isChecked()) {
     // empty list of arguments means that all arguments should be restored
-    getGeomEngine()->RestoreSubShapesSO(theStudy, theSObject, GEOM::ListOfGO(),
+    getGeomEngine()->RestoreSubShapesSO(theSObject, GEOM::ListOfGO(),
                                         /*theFindMethod=*/GEOM::FSM_GetInPlace,
                                         /*theInheritFirstArg=*/true,
                                         mainFrame()->CheckBoxAddPrefix->isChecked());
index 215963785f91031ee73fff85e9c342bdba895ee9..09f5506d8dead0e3bbbef1b9aedaf16398b803e5 100644 (file)
@@ -48,7 +48,7 @@ protected:
   virtual GEOM::GEOM_IOperations_ptr createOperation();
   virtual bool                       isValid( QString& );
   virtual bool                       execute( ObjectList& );
-  virtual void                       restoreSubShapes( SALOMEDS::Study_ptr, SALOMEDS::SObject_ptr );
+  virtual void                       restoreSubShapes( SALOMEDS::SObject_ptr );
   virtual QList<GEOM::GeomObjPtr>    getSourceObjects();
 
 private:
index 1748675bc06a23b6a96ba67825cefc9ab4d1c599..b03a105a13df5122aedc203dfa52316d1a2cd84f 100755 (executable)
@@ -294,12 +294,11 @@ bool RepairGUI_UnionFacesDlg::execute( ObjectList& objects )
 // function : restoreSubShapes
 // purpose  :
 //=================================================================================
-void RepairGUI_UnionFacesDlg::restoreSubShapes( SALOMEDS::Study_ptr   theStudy,
-                                                SALOMEDS::SObject_ptr theSObject )
+void RepairGUI_UnionFacesDlg::restoreSubShapes( SALOMEDS::SObject_ptr theSObject )
 {
   if ( mainFrame()->CheckBoxRestoreSS->isChecked() ) {
     // empty list of arguments means that all arguments should be restored
-    getGeomEngine()->RestoreSubShapesSO( theStudy, theSObject, GEOM::ListOfGO(),
+    getGeomEngine()->RestoreSubShapesSO( theSObject, GEOM::ListOfGO(),
                                          /*theFindMethod=*/GEOM::FSM_GetInPlace, // ? GetInPlaceByHistory
                                          /*theInheritFirstArg=*/true,
                                          mainFrame()->CheckBoxAddPrefix->isChecked() );
index 0d74105a19ffce015f6a25bd4c26d743d10a26e5..1e8c68d254e18a9d04105815cbceafc98ce7ccdc 100755 (executable)
@@ -45,7 +45,7 @@ protected:
   virtual GEOM::GEOM_IOperations_ptr createOperation();
   virtual bool                       isValid( QString& );
   virtual bool                       execute( ObjectList& );    
-  virtual void                       restoreSubShapes( SALOMEDS::Study_ptr, SALOMEDS::SObject_ptr );
+  virtual void                       restoreSubShapes( SALOMEDS::SObject_ptr );
   virtual QList<GEOM::GeomObjPtr>    getSourceObjects();
 
 private:
index 3db28bb463b07422a38764f19fe6532a6b0f0a1e..284e8fba066230da0909d3c83f6617fbdaaf564f 100644 (file)
@@ -111,8 +111,6 @@ bool STEPPlugin_GUI::importSTEP( SUIT_Desktop* parent )
 {
   SalomeApp_Application* app = getGeometryGUI()->getApp();
   if ( !app ) return false;
-  SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*> ( app->activeStudy() );
-  if ( !study ) return false;
 
   GEOM::GEOM_IOperations_var op = GeometryGUI::GetGeomGen()->GetPluginOperations( "STEPPluginEngine" );
   STEPOpPtr stepOp = GEOM::ISTEPOperations::_narrow( op );
@@ -193,7 +191,7 @@ bool STEPPlugin_GUI::importSTEP( SUIT_Desktop* parent )
            GeometryGUI::GetGeomGen()->AddInStudy( group, grpName.in(), main );
          }
          transaction.commit();
-         GEOM_Displayer( study ).Display( main.in() );
+         GEOM_Displayer().Display( main.in() );
           main->UnRegister();
        }
        else
index 86f00981f512ce993a226704d76c26c0c61760a4..cae343405dad5f93b1ba4c5e06ac0c1b7e636389 100644 (file)
@@ -46,12 +46,11 @@ STEPPlugin_IECallBack::~STEPPlugin_IECallBack()
  */
 //=============================================================================
 bool
-STEPPlugin_IECallBack::Export( int                            theDocId,
-                              const Handle(GEOM_Object)      theOriginal,
-                              const TCollection_AsciiString& theFileName,
-                              const TCollection_AsciiString& theFormatName )
+STEPPlugin_IECallBack::Export( const Handle(GEOM_Object)      theOriginal,
+                               const TCollection_AsciiString& theFileName,
+                               const TCollection_AsciiString& theFormatName )
 {
-  STEPPlugin_IOperations* aPluginOperations = STEPPlugin_OperationsCreator::get( GetEngine(), theDocId );
+  STEPPlugin_IOperations* aPluginOperations = STEPPlugin_OperationsCreator::get( GetEngine() );
   const STEPPlugin_IOperations::LengthUnit aUnit = STEPPlugin_IOperations::LengthUnit_Meter;
 
   aPluginOperations->ExportSTEP( theOriginal, theFileName, aUnit );
@@ -64,11 +63,10 @@ STEPPlugin_IECallBack::Export( int                            theDocId,
  */
 //=============================================================================
 Handle(TColStd_HSequenceOfTransient)
-STEPPlugin_IECallBack::Import( int                            theDocId,
-                              const TCollection_AsciiString& theFormatName,
-                              const TCollection_AsciiString& theFileName )
+STEPPlugin_IECallBack::Import( const TCollection_AsciiString& theFormatName,
+                               const TCollection_AsciiString& theFileName )
 {
-  STEPPlugin_IOperations* aPluginOperations = STEPPlugin_OperationsCreator::get( GetEngine(), theDocId );
+  STEPPlugin_IOperations* aPluginOperations = STEPPlugin_OperationsCreator::get( GetEngine() );
   bool anIsIgnoreUnits = ( theFormatName == "STEP_SCALE" ) ? true : false;
   return aPluginOperations->ImportSTEP( theFileName, anIsIgnoreUnits, false );
 }
@@ -79,11 +77,10 @@ STEPPlugin_IECallBack::Import( int                            theDocId,
  */
 //=============================================================================
 TCollection_AsciiString
-STEPPlugin_IECallBack::ReadValue( int                            theDocId,
-                                 const TCollection_AsciiString& theFileName,
-                                 const TCollection_AsciiString& theFormatName,
-                                 const TCollection_AsciiString& theParameterName )
+STEPPlugin_IECallBack::ReadValue( const TCollection_AsciiString& theFileName,
+                                  const TCollection_AsciiString& theFormatName,
+                                  const TCollection_AsciiString& theParameterName )
 {
-  STEPPlugin_IOperations* aPluginOperations = STEPPlugin_OperationsCreator::get( GetEngine(), theDocId );
+  STEPPlugin_IOperations* aPluginOperations = STEPPlugin_OperationsCreator::get( GetEngine() );
   return aPluginOperations->ReadValue( theFileName, theParameterName );
 }
index 3f961d8bcb286cfaaac04820b8e9b297e3a4c40b..71c55f45602702c6ca73f14f6c73d8ce9a4e6898 100644 (file)
@@ -36,17 +36,14 @@ public:
   STEPPlugin_IECallBack();
   ~STEPPlugin_IECallBack();
   
-  bool         Export( int                            theDocId,
-                      const Handle(GEOM_Object)      theOriginal,
+  bool Export( const Handle(GEOM_Object)      theOriginal,
                       const TCollection_AsciiString& theFileName,
                       const TCollection_AsciiString& theFormatName );
 
-  Handle(TColStd_HSequenceOfTransient) Import( int                            theDocId,
-                                              const TCollection_AsciiString& theFormatName,
-                                              const TCollection_AsciiString& theFileName );
+  Handle(TColStd_HSequenceOfTransient) Import( const TCollection_AsciiString& theFormatName,
+                                               const TCollection_AsciiString& theFileName );
 
-  TCollection_AsciiString  ReadValue( int                            theDocId,
-                                     const TCollection_AsciiString& theFileName,
+  TCollection_AsciiString  ReadValue( const TCollection_AsciiString& theFileName,
                                       const TCollection_AsciiString& theFormatName,
                                       const TCollection_AsciiString& theParameterName );
 };
index ec5943759c305f64da498e4c02dbc6b4f60b5a87..46a4594a1384cd2b3e3da3311adea8ec8d7cf219 100644 (file)
@@ -38,8 +38,8 @@
  *  Constructor
  */
 //=============================================================================
-STEPPlugin_IOperations::STEPPlugin_IOperations( GEOM_Engine* theEngine, int theDocID )
-: GEOMImpl_IBaseIEOperations( theEngine, theDocID )
+STEPPlugin_IOperations::STEPPlugin_IOperations( GEOM_Engine* theEngine )
+: GEOMImpl_IBaseIEOperations( theEngine )
 {
   MESSAGE( "STEPPlugin_IOperations::STEPPlugin_IOperations" );
 }
@@ -122,7 +122,7 @@ void STEPPlugin_IOperations::ExportSTEP
   if( aRefFunction.IsNull() ) return;  //There is no function which creates an object to be exported
 
   //Add a new result object
-  Handle(GEOM_Object) result = GetEngine()->AddObject( GetDocID(), GEOM_IMPORT);
+  Handle(GEOM_Object) result = GetEngine()->AddObject( GEOM_IMPORT);
 
   //Add an Export function
   Handle(GEOM_Function) aFunction = result->AddFunction( STEPPlugin_ExportDriver::GetID(), EXPORT_SHAPE );
@@ -175,7 +175,7 @@ STEPPlugin_IOperations::ImportSTEP(const TCollection_AsciiString& theFileName,
   if( theFileName.IsEmpty() ) return NULL;
 
   //Add a new result object
-  Handle(GEOM_Object) anImported = GetEngine()->AddObject( GetDocID(), GEOM_IMPORT );
+  Handle(GEOM_Object) anImported = GetEngine()->AddObject( GEOM_IMPORT );
 
   //Add an Import function
   Handle(GEOM_Function) aFunction =
index 4a29e5a1e27b99018d0895bc8567001b6f9212d0..a99c57d2205181a2c778e4ccd3801148c710ebee 100644 (file)
@@ -51,7 +51,7 @@ public:
 
 
 public:
-  STEPPlugin_IOperations( GEOM_Engine*, int );
+  STEPPlugin_IOperations( GEOM_Engine* );
   ~STEPPlugin_IOperations();
 
   void ExportSTEP( const Handle(GEOM_Object),
index 272a0313b4a57455d7dee5c86481fca2463b88c8..c81392c7e5354114da380784d0ebb01148c725b8 100644 (file)
@@ -35,6 +35,8 @@
 // OCCT includes
 #include <TFunction_DriverTable.hxx>
 
+STEPPlugin_IOperations* STEPPlugin_OperationsCreator::_operation;
+
 STEPPlugin_OperationsCreator::STEPPlugin_OperationsCreator()
 {
   // Register drivers
@@ -59,6 +61,12 @@ GEOM_IOperations_i* STEPPlugin_OperationsCreator::Create( PortableServer::POA_pt
 {
   Unexpect aCatch( SALOME_SalomeException );
   MESSAGE( "STEPPlugin_OperationsCreator::Create" );
-  STEPPlugin_IOperations* anOperation = new STEPPlugin_IOperations( theGenImpl );
-  return new STEPPlugin_IOperations_i( thePOA, theEngine, anOperation );
+  return new STEPPlugin_IOperations_i( thePOA, theEngine, get(theGenImpl) );
+}
+
+STEPPlugin_IOperations* STEPPlugin_OperationsCreator::get( ::GEOMImpl_Gen* theGenImpl )
+{
+  if( !_operation )
+    _operation = new STEPPlugin_IOperations( theGenImpl );
+  return _operation;
 }
index f9f5d5ee28107bd542cf0c845f8ed519c17e5ead..2caf56dfc774f191966533f5168f7549b91dfd27 100755 (executable)
@@ -43,7 +43,11 @@ public:
   GEOM_IOperations_i* Create( PortableServer::POA_ptr thePOA,
                               GEOM::GEOM_Gen_ptr      theEngine,
                               ::GEOMImpl_Gen*         theGenImpl );
+private:
+  static STEPPlugin_IOperations* get(::GEOMImpl_Gen* theGenImpl);
 
+private:
+  static STEPPlugin_IOperations* _operation;
 
   friend class STEPPlugin_IECallBack;
 };
index 6ca36ac81cef67700d7b917650f136f266972386..52a87f59f657aa8d7cdd39f630a68c851bed8238 100644 (file)
@@ -107,8 +107,6 @@ bool STLPlugin_GUI::importSTL( SUIT_Desktop* parent )
 {
   SalomeApp_Application* app = getGeometryGUI()->getApp();
   if ( !app ) return false;
-  SalomeApp_Study* study = dynamic_cast<SalomeApp_Study*> ( app->activeStudy() );
-  if ( !study ) return false;
 
   GEOM::GEOM_IOperations_var op = GeometryGUI::GetGeomGen()->GetPluginOperations( "STLPluginEngine" );
   STLOpPtr stlOp = GEOM::ISTLOperations::_narrow( op );
@@ -143,7 +141,7 @@ bool STLPlugin_GUI::importSTL( SUIT_Desktop* parent )
          
          entryList.append( so->GetID() );
          transaction.commit();
-         GEOM_Displayer( study ).Display( main.in() );
+         GEOM_Displayer().Display( main.in() );
           main->UnRegister();
        }
        else
index be4d0ce6d7dfc93135a996739acc4d674df5fed6..e4f35377f9906f6a7db604c6643dc9d2f3e9261b 100755 (executable)
@@ -46,12 +46,11 @@ STLPlugin_IECallBack::~STLPlugin_IECallBack()
  */
 //=============================================================================
 bool 
-STLPlugin_IECallBack::Export( int                            theDocId,
-                             const Handle(GEOM_Object)      theOriginal,
-                             const TCollection_AsciiString& theFileName,
-                             const TCollection_AsciiString& theFormatName )
+STLPlugin_IECallBack::Export( const Handle(GEOM_Object)      theOriginal,
+                              const TCollection_AsciiString& theFileName,
+                              const TCollection_AsciiString& theFormatName )
 {
-  STLPlugin_IOperations* aPluginOperations = STLPlugin_OperationsCreator::get( GetEngine(), theDocId );
+  STLPlugin_IOperations* aPluginOperations = STLPlugin_OperationsCreator::get( GetEngine() );
   bool anIsASCII = ( theFormatName == "STL_Bin") ? false : true;
   const double aDeflection = 0.001;
   const bool anIsRelative = true;
@@ -65,11 +64,10 @@ STLPlugin_IECallBack::Export( int                            theDocId,
  */
 //=============================================================================
 Handle(TColStd_HSequenceOfTransient)
-STLPlugin_IECallBack::Import( int                            theDocId,
-                             const TCollection_AsciiString& theFormatName,
-                             const TCollection_AsciiString& theFileName )
+STLPlugin_IECallBack::Import( const TCollection_AsciiString& theFormatName,
+                              const TCollection_AsciiString& theFileName )
 {
-  STLPlugin_IOperations* aPluginOperations = STLPlugin_OperationsCreator::get( GetEngine(), theDocId );
+  STLPlugin_IOperations* aPluginOperations = STLPlugin_OperationsCreator::get( GetEngine() );
   return aPluginOperations->ImportSTL( theFileName );
 }
 
index fb897940313e234df69f0cfc8355191af030762d..a2bf421c9c53fc6f73619d60932cfb87cb779743 100644 (file)
@@ -36,15 +36,13 @@ public:
   STLPlugin_IECallBack();
   ~STLPlugin_IECallBack();
   
-  virtual bool Export( int                            theDocId,
-                      const Handle(GEOM_Object)      theOriginal,
-                      const TCollection_AsciiString& theFileName,
-                      const TCollection_AsciiString& theFormatName );
+  virtual bool Export( const Handle(GEOM_Object)      theOriginal,
+                       const TCollection_AsciiString& theFileName,
+                       const TCollection_AsciiString& theFormatName );
 
   virtual
-  Handle(TColStd_HSequenceOfTransient) Import( int                            theDocId,
-                                              const TCollection_AsciiString& theFormatName,
-                                              const TCollection_AsciiString& theFileName );
+  Handle(TColStd_HSequenceOfTransient) Import( const TCollection_AsciiString& theFormatName,
+                                               const TCollection_AsciiString& theFileName );
 };
 
 #endif
index 0008bf7790944d4a6d2c637a3098e5d7efdf5c73..f3d2928b5f943554c4b963de2774fbc19e669e6e 100644 (file)
@@ -38,8 +38,8 @@
  *  Constructor
  */
 //=============================================================================
-STLPlugin_IOperations::STLPlugin_IOperations( GEOM_Engine* theEngine, int theDocID )
-: GEOMImpl_IBaseIEOperations( theEngine, theDocID )
+STLPlugin_IOperations::STLPlugin_IOperations( GEOM_Engine* theEngine )
+: GEOMImpl_IBaseIEOperations( theEngine )
 {
   MESSAGE( "STLPlugin_IOperations::STLPlugin_IOperations" );
 }
@@ -80,7 +80,7 @@ void STLPlugin_IOperations::ExportSTL( const Handle(GEOM_Object)      theOrigina
   if( aRefFunction.IsNull() ) return;  //There is no function which creates an object to be exported
 
   //Add a new result object
-  Handle(GEOM_Object) result = GetEngine()->AddObject( GetDocID(), GEOM_IMPORT);
+  Handle(GEOM_Object) result = GetEngine()->AddObject( GEOM_IMPORT);
 
   //Add an Export function
   Handle(GEOM_Function) aFunction = result->AddFunction( STLPlugin_ExportDriver::GetID(), EXPORT_SHAPE );
@@ -134,7 +134,7 @@ STLPlugin_IOperations::ImportSTL( const TCollection_AsciiString& theFileName )
   if( theFileName.IsEmpty() ) return NULL;
 
   //Add a new result object
-  Handle(GEOM_Object) anImported = GetEngine()->AddObject( GetDocID(), GEOM_IMPORT );
+  Handle(GEOM_Object) anImported = GetEngine()->AddObject( GEOM_IMPORT );
 
   //Add an Import function
   Handle(GEOM_Function) aFunction =
index 776cc4aba4a2d09ee8b1e482852a75a29610c3c2..2ecca4b5ded2626fd4e9800cf9a71847052978b5 100644 (file)
@@ -30,7 +30,7 @@
 class STLPLUGINENGINE_EXPORT STLPlugin_IOperations: public GEOMImpl_IBaseIEOperations
 {
 public:
-  STLPlugin_IOperations( GEOM_Engine*, int );
+  STLPlugin_IOperations( GEOM_Engine* );
   ~STLPlugin_IOperations();
 
   void ExportSTL( const Handle(GEOM_Object),
index e7defaa0a75d45278efe8836a137013a636e6264..401dbff865af69498bd2946b3481ec8593783953 100644 (file)
@@ -32,6 +32,8 @@
 // OCCT includes
 #include <TFunction_DriverTable.hxx>
 
+STLPlugin_IOperations* STLPlugin_OperationsCreator::_operation;
+
 STLPlugin_OperationsCreator::STLPlugin_OperationsCreator()
 {
   // Register drivers
@@ -56,6 +58,12 @@ GEOM_IOperations_i* STLPlugin_OperationsCreator::Create( PortableServer::POA_ptr
 {
   Unexpect aCatch( SALOME_SalomeException );
   MESSAGE( "STLPlugin_OperationsCreator::Create" );
-  STLPlugin_IOperations* anOperation = new STLPlugin_IOperations( theGenImpl );
-  return new STLPlugin_IOperations_i( thePOA, theEngine, anOperation );
+  return new STLPlugin_IOperations_i( thePOA, theEngine, get( theGenImpl ) );
+}
+
+STLPlugin_IOperations* STLPlugin_OperationsCreator::get( ::GEOMImpl_Gen* theGenImpl )
+{
+  if( !_operation )
+    _operation = new STLPlugin_IOperations( theGenImpl );
+  return _operation;
 }
index 896bf75b4dd26cadb8f3555c26094dac9857d59f..1c2177c2ed1bff5c4a77a713711323f5c012095c 100755 (executable)
@@ -44,6 +44,12 @@ public:
                               GEOM::GEOM_Gen_ptr      theEngine,
                               ::GEOMImpl_Gen*         theGenImpl );
 
+private:
+  static STLPlugin_IOperations* get(::GEOMImpl_Gen* theGenImpl);
+
+private:
+  static STLPlugin_IOperations* _operation;
+
   friend class STLPlugin_IECallBack;
 };
 
index 1cb0bc892f92e83b440b078b68fd82991231f7b0..f1605786ea1fd40d57a872948f0cd896e574ac96 100644 (file)
@@ -114,13 +114,11 @@ bool TransformationGUI::OnGUIEvent( int theCommandID, SUIT_Desktop* parent )
     break;
   case GEOMOp::OpReimport:       // RELOAD IMPORTED SHAPE
     {
-      SalomeApp_Study* anAppStudy = dynamic_cast<SalomeApp_Study*>(app->activeStudy());
-
       GEOM::GEOM_ITransformOperations_var anOp =
-        GeometryGUI::GetGeomGen()->GetITransformOperations(anAppStudy->id());
+        GeometryGUI::GetGeomGen()->GetITransformOperations();
       if (anOp->_is_nil()) return false;
 
-      GEOM_Displayer aDisp (anAppStudy);
+      GEOM_Displayer aDisp;
       SUIT_Desktop* desk = app->desktop();
       QList<SUIT_ViewWindow*> wnds = desk->windows();
 
index 76459aa05c736e321e74adacb381c1a3259c9953..8cd153433bc456f41627e7255efb2165e6324aa4 100644 (file)
@@ -414,12 +414,11 @@ bool  TransformationGUI_MirrorDlg::execute (ObjectList& objects)
 // function : restoreSubShapes
 // purpose  :
 //=================================================================================
-void TransformationGUI_MirrorDlg::restoreSubShapes (SALOMEDS::Study_ptr   theStudy,
-                                                    SALOMEDS::SObject_ptr theSObject)
+void TransformationGUI_MirrorDlg::restoreSubShapes (SALOMEDS::SObject_ptr theSObject)
 {
   if (mainFrame()->CheckBoxRestoreSS->isChecked()) {
     // empty list of arguments means that all arguments should be restored
-    getGeomEngine()->RestoreSubShapesSO(theStudy, theSObject, GEOM::ListOfGO(),
+    getGeomEngine()->RestoreSubShapesSO(theSObject, GEOM::ListOfGO(),
                                         /*theFindMethod=*/GEOM::FSM_Transformed,
                                         /*theInheritFirstArg=*/true,
                                         mainFrame()->CheckBoxAddPrefix->isChecked());
index eb9cb4405a600b466e1a249ba1726f623d39c445..8147b3e852ac0abf98953d23faae6aa0d9e658e9 100644 (file)
@@ -51,7 +51,7 @@ protected:
   virtual bool                       isValid( QString& );
   virtual bool                       execute( ObjectList& );
   virtual void                       addSubshapesToStudy();
-  virtual void                       restoreSubShapes( SALOMEDS::Study_ptr, SALOMEDS::SObject_ptr );
+  virtual void                       restoreSubShapes( SALOMEDS::SObject_ptr );
   virtual QList<GEOM::GeomObjPtr>    getSourceObjects();
 
 private:
index d6cc0ab79760993a9cb023d622ca8ecee13d74f4..ecf1f3cd13113f693ab6aa0e0d43d6ee2c661563 100644 (file)
@@ -565,8 +565,7 @@ QList<GEOM::GeomObjPtr> TransformationGUI_MultiRotationDlg::getSourceObjects()
 // function : restoreSubShapes
 // purpose  :
 //=================================================================================
-void TransformationGUI_MultiRotationDlg::restoreSubShapes (SALOMEDS::Study_ptr   theStudy,
-                                                           SALOMEDS::SObject_ptr theSObject)
+void TransformationGUI_MultiRotationDlg::restoreSubShapes (SALOMEDS::SObject_ptr theSObject)
 {
   if (mainFrame()->CheckBoxRestoreSS->isChecked()) {
     // we pass here the first operation argument (object) through the list of arguments
@@ -575,7 +574,7 @@ void TransformationGUI_MultiRotationDlg::restoreSubShapes (SALOMEDS::Study_ptr
     GEOM::ListOfGO_var anArgs = new GEOM::ListOfGO;
     anArgs->length(1);
     anArgs[0] = myBase.copy();
-    getGeomEngine()->RestoreSubShapesSO(theStudy, theSObject, anArgs,
+    getGeomEngine()->RestoreSubShapesSO(theSObject, anArgs,
                                         /*theFindMethod=*/GEOM::FSM_MultiTransformed,
                                         /*theInheritFirstArg=*/true,
                                         mainFrame()->CheckBoxAddPrefix->isChecked());
index 9e9a9ea68bfe346e3e4b1765ff13d86863b1f696..bb0b0e1565aa0671e3e4ec0816c75e6831df572a 100644 (file)
@@ -97,7 +97,7 @@ protected:
   virtual bool                       isValid( QString& );
   virtual bool                       execute( ObjectList& );
   virtual void                       addSubshapesToStudy();
-  virtual void                       restoreSubShapes( SALOMEDS::Study_ptr, SALOMEDS::SObject_ptr );
+  virtual void                       restoreSubShapes( SALOMEDS::SObject_ptr );
   virtual QList<GEOM::GeomObjPtr>    getSourceObjects();
 
 private:
index cd69f6a73f8ac6770c8edc6710cf4130cbf4a2d1..c867be1d73e8a073ac6a64940d2f7c9c6b6563ec 100644 (file)
@@ -728,8 +728,7 @@ QList<GEOM::GeomObjPtr> TransformationGUI_MultiTranslationDlg::getSourceObjects(
 // function : restoreSubShapes
 // purpose  :
 //=================================================================================
-void TransformationGUI_MultiTranslationDlg::restoreSubShapes (SALOMEDS::Study_ptr   theStudy,
-                                                              SALOMEDS::SObject_ptr theSObject)
+void TransformationGUI_MultiTranslationDlg::restoreSubShapes (SALOMEDS::SObject_ptr theSObject)
 {
   if (mainFrame()->CheckBoxRestoreSS->isChecked()) {
     // we pass here the first operation argument (object) through the list of arguments
@@ -738,7 +737,7 @@ void TransformationGUI_MultiTranslationDlg::restoreSubShapes (SALOMEDS::Study_pt
     GEOM::ListOfGO_var anArgs = new GEOM::ListOfGO;
     anArgs->length(1);
     anArgs[0] = myBase.copy();
-    getGeomEngine()->RestoreSubShapesSO(theStudy, theSObject, anArgs,
+    getGeomEngine()->RestoreSubShapesSO(theSObject, anArgs,
                                         /*theFindMethod=*/GEOM::FSM_MultiTransformed,
                                         /*theInheritFirstArg=*/true,
                                         mainFrame()->CheckBoxAddPrefix->isChecked());
index 43f618c936e381ee92102e26be2a0583c153d626..94c95f7b2e432213bc29285161810f8821957bfc 100644 (file)
@@ -52,7 +52,7 @@ protected:
   virtual bool                       isValid( QString& );
   virtual bool                       execute( ObjectList& );
   virtual void                       addSubshapesToStudy();
-  virtual void                       restoreSubShapes( SALOMEDS::Study_ptr, SALOMEDS::SObject_ptr );
+  virtual void                       restoreSubShapes( SALOMEDS::SObject_ptr );
   virtual QList<GEOM::GeomObjPtr>    getSourceObjects();
 
 private:
index d060a1f5332bf99542176b1bdf4afc2fffebfb32..083428f9b756d3ca37b264de42c1454546a587e1 100644 (file)
@@ -299,12 +299,11 @@ bool TransformationGUI_OffsetDlg::execute( ObjectList& objects )
 // function : restoreSubShapes
 // purpose  :
 //=================================================================================
-void TransformationGUI_OffsetDlg::restoreSubShapes( SALOMEDS::Study_ptr   theStudy,
-                                                    SALOMEDS::SObject_ptr theSObject )
+void TransformationGUI_OffsetDlg::restoreSubShapes( SALOMEDS::SObject_ptr theSObject )
 {
   if ( mainFrame()->CheckBoxRestoreSS->isChecked() ) {
     // empty list of arguments means that all arguments should be restored
-    getGeomEngine()->RestoreSubShapesSO( theStudy, theSObject, GEOM::ListOfGO(),
+    getGeomEngine()->RestoreSubShapesSO( theSObject, GEOM::ListOfGO(),
                                          /*theFindMethod=*/GEOM::FSM_Transformed,
                                          /*theInheritFirstArg=*/true,
                                          mainFrame()->CheckBoxAddPrefix->isChecked() );
index c2ec78c418243411f10d54e578c73719872183db..413ac4211bb57060a47d0c5cf116e672cb6a4aad 100644 (file)
@@ -50,7 +50,7 @@ protected:
   virtual GEOM::GEOM_IOperations_ptr createOperation();
   virtual bool                       isValid( QString& );
   virtual bool                       execute( ObjectList& );
-  virtual void                       restoreSubShapes( SALOMEDS::Study_ptr, SALOMEDS::SObject_ptr );
+  virtual void                       restoreSubShapes( SALOMEDS::SObject_ptr );
   virtual QList<GEOM::GeomObjPtr>    getSourceObjects();
   
 private:
index f41760fc875fca489c4500a480da4953a47241cf..878c33dfcf122a5320f43db3eb65d0ae42c3a03d 100644 (file)
@@ -578,12 +578,11 @@ bool TransformationGUI_PositionDlg::execute (ObjectList& objects)
 // function : restoreSubShapes
 // purpose  :
 //=================================================================================
-void TransformationGUI_PositionDlg::restoreSubShapes (SALOMEDS::Study_ptr   theStudy,
-                                                      SALOMEDS::SObject_ptr theSObject)
+void TransformationGUI_PositionDlg::restoreSubShapes (SALOMEDS::SObject_ptr theSObject)
 {
   if (mainFrame()->CheckBoxRestoreSS->isChecked()) {
     // empty list of arguments means that all arguments should be restored
-    getGeomEngine()->RestoreSubShapesSO(theStudy, theSObject, GEOM::ListOfGO(),
+    getGeomEngine()->RestoreSubShapesSO(theSObject, GEOM::ListOfGO(),
                                         /*theFindMethod=*/GEOM::FSM_Transformed,
                                         /*theInheritFirstArg=*/true,
                                         mainFrame()->CheckBoxAddPrefix->isChecked());
index 9457ab4a1c20b6015b4a274c93741063bda119be..11257fdde59e24a0146cbdf0258e9442016eeee1 100644 (file)
@@ -50,7 +50,7 @@ protected:
   virtual GEOM::GEOM_IOperations_ptr createOperation();
   virtual bool                       isValid( QString& );
   virtual bool                       execute( ObjectList& );
-  virtual void                       restoreSubShapes( SALOMEDS::Study_ptr, SALOMEDS::SObject_ptr );
+  virtual void                       restoreSubShapes( SALOMEDS::SObject_ptr );
   virtual void                       addSubshapesToStudy();
   virtual QList<GEOM::GeomObjPtr>    getSourceObjects();
 
index 291726e166adb8ed37838101a7450cfdc7deebfd..d7cf7b6b27901e09918043156d788fd38027504a 100644 (file)
@@ -549,8 +549,7 @@ bool TransformationGUI_RotationDlg::execute (ObjectList& objects)
 // function : restoreSubShapes
 // purpose  :
 //=================================================================================
-void TransformationGUI_RotationDlg::restoreSubShapes (SALOMEDS::Study_ptr   theStudy,
-                                                      SALOMEDS::SObject_ptr theSObject)
+void TransformationGUI_RotationDlg::restoreSubShapes (SALOMEDS::SObject_ptr theSObject)
 {
   if (mainFrame()->CheckBoxRestoreSS->isChecked()) {
     // we pass here the first operation argument (object) through the list of arguments
@@ -559,7 +558,7 @@ void TransformationGUI_RotationDlg::restoreSubShapes (SALOMEDS::Study_ptr   theS
     GEOM::ListOfGO_var anArgs = new GEOM::ListOfGO;
     anArgs->length(1);
     anArgs[0] = myCurrObject.copy();
-    getGeomEngine()->RestoreSubShapesSO(theStudy, theSObject, anArgs,
+    getGeomEngine()->RestoreSubShapesSO(theSObject, anArgs,
                                         /*theFindMethod=*/GEOM::FSM_Transformed,
                                         /*theInheritFirstArg=*/true,
                                         mainFrame()->CheckBoxAddPrefix->isChecked());
index d5b1c4d17c1725b8cff315708ce8cbec8d80b326..c30cb9347b9e8717528c3a54123748b928723497 100644 (file)
@@ -51,7 +51,7 @@ protected:
   virtual bool                       isValid( QString& );
   virtual bool                       execute( ObjectList& );
   virtual void                       addSubshapesToStudy();
-  virtual void                       restoreSubShapes( SALOMEDS::Study_ptr, SALOMEDS::SObject_ptr );
+  virtual void                       restoreSubShapes( SALOMEDS::SObject_ptr );
   virtual QList<GEOM::GeomObjPtr>    getSourceObjects();
 
 private:
index d37664a2bd3299b71163b09ddaad9a0d8126395b..5a8930bd7b80ee9b23c652a99c59ef852b5d7521 100644 (file)
@@ -500,12 +500,11 @@ bool TransformationGUI_ScaleDlg::execute (ObjectList& objects)
 // function : restoreSubShapes
 // purpose  :
 //=================================================================================
-void TransformationGUI_ScaleDlg::restoreSubShapes (SALOMEDS::Study_ptr   theStudy,
-                                                   SALOMEDS::SObject_ptr theSObject)
+void TransformationGUI_ScaleDlg::restoreSubShapes (SALOMEDS::SObject_ptr theSObject)
 {
   if (mainFrame()->CheckBoxRestoreSS->isChecked()) {
     // empty list of arguments means that all arguments should be restored
-    getGeomEngine()->RestoreSubShapesSO(theStudy, theSObject, GEOM::ListOfGO(),
+    getGeomEngine()->RestoreSubShapesSO(theSObject, GEOM::ListOfGO(),
                                         /*theFindMethod=*/GEOM::FSM_Transformed,
                                         /*theInheritFirstArg=*/true,
                                         mainFrame()->CheckBoxAddPrefix->isChecked());
index 219950dd01e74c06bc9076fbaf32b7cec05de0d2..f1ca3567f7dfdde89d2c3ec1e8f0c7f9bfd252c7 100644 (file)
@@ -56,7 +56,7 @@ protected:
   virtual bool                       isValid( QString& );
   virtual bool                       execute( ObjectList& );
   virtual void                       addSubshapesToStudy();
-  virtual void                       restoreSubShapes( SALOMEDS::Study_ptr, SALOMEDS::SObject_ptr );
+  virtual void                       restoreSubShapes( SALOMEDS::SObject_ptr );
   virtual QList<GEOM::GeomObjPtr>    getSourceObjects();
 
 private:
index 57cf49b4d3949d6556437c9beac37b7e8914169e..6057a591f3560b03e5ca4556978d0fcc34eea12f 100644 (file)
@@ -604,8 +604,7 @@ bool TransformationGUI_TranslationDlg::execute (ObjectList& objects)
 // function : restoreSubShapes
 // purpose  :
 //=================================================================================
-void TransformationGUI_TranslationDlg::restoreSubShapes (SALOMEDS::Study_ptr   theStudy,
-                                                         SALOMEDS::SObject_ptr theSObject)
+void TransformationGUI_TranslationDlg::restoreSubShapes (SALOMEDS::SObject_ptr theSObject)
 {
   if (mainFrame()->CheckBoxRestoreSS->isChecked()) {
     // we pass here the first operation argument (object) through the list of arguments
@@ -614,7 +613,7 @@ void TransformationGUI_TranslationDlg::restoreSubShapes (SALOMEDS::Study_ptr   t
     GEOM::ListOfGO_var anArgs = new GEOM::ListOfGO;
     anArgs->length(1);
     anArgs[0] = myCurrObject.copy();
-    getGeomEngine()->RestoreSubShapesSO(theStudy, theSObject, anArgs,
+    getGeomEngine()->RestoreSubShapesSO(theSObject, anArgs,
                                         /*theFindMethod=*/GEOM::FSM_Transformed,
                                         /*theInheritFirstArg=*/true,
                                         mainFrame()->CheckBoxAddPrefix->isChecked());
index 8aab1b6fdf24f50aff9108f7da4ed030facb6d52..fd2eb99a2e3264e07df6e1518d1f48791dd1c8e6 100644 (file)
@@ -51,7 +51,7 @@ protected:
   virtual bool                       isValid( QString& );
   virtual bool                       execute( ObjectList& );
   virtual void                       addSubshapesToStudy();
-  virtual void                       restoreSubShapes( SALOMEDS::Study_ptr, SALOMEDS::SObject_ptr );
+  virtual void                       restoreSubShapes( SALOMEDS::SObject_ptr );
   virtual QList<GEOM::GeomObjPtr>    getSourceObjects();
 
 private:
index c3e357e64b054c50f01d0ddbe9a6918100835685..48ccea52da4fcfff2bdc0a2ac005c65164be9f12 100644 (file)
@@ -34,7 +34,6 @@
 #include "GeometryGUI.h"
 #include "GEOM_Operation.h"
 #include "GEOMBase.h"
-#include "GEOM_Displayer.h"
 #include "GEOM_GenericObjPtr.h"
 
 #include <SALOMEconfig.h>
index 12e6c7f769cc54913513b89741a9ee171b635540..389e6adb793fdf7fb21d20e70a90f5903f7df448 100755 (executable)
@@ -45,12 +45,11 @@ VTKPlugin_IECallBack::~VTKPlugin_IECallBack()
  *  Export
  */
 //=============================================================================
-bool VTKPlugin_IECallBack::Export( int                            theDocId,
-                                  const Handle(GEOM_Object)      theOriginal,
-                                  const TCollection_AsciiString& theFileName,
-                                  const TCollection_AsciiString& theFormatName )
+bool VTKPlugin_IECallBack::Export( const Handle(GEOM_Object)      theOriginal,
+                                   const TCollection_AsciiString& theFileName,
+                                   const TCollection_AsciiString& theFormatName )
 {
-  VTKPlugin_IOperations* aPluginOperations = VTKPlugin_OperationsCreator::get( GetEngine(), theDocId );
+  VTKPlugin_IOperations* aPluginOperations = VTKPlugin_OperationsCreator::get( GetEngine() );
   const double aDeflection = 0.001;
   aPluginOperations->ExportVTK( theOriginal, theFileName, aDeflection );
   return true;
index 71ba137e50e6522ab6ffe3e96aaef6885b2fc573..3140898e0648c3433e7298c13f7cf6a343c2c736 100644 (file)
@@ -36,10 +36,9 @@ public:
   VTKPlugin_IECallBack();
   ~VTKPlugin_IECallBack();
   
-  bool Export( int                            theDocId,
-              const Handle(GEOM_Object)      theOriginal,
-              const TCollection_AsciiString& theFileName,
-              const TCollection_AsciiString& theFormatName );
+  bool Export( const Handle(GEOM_Object)      theOriginal,
+               const TCollection_AsciiString& theFileName,
+               const TCollection_AsciiString& theFormatName );
 };
 
 #endif
index ab8f79fb20c23b3fe44c17fe2280e6b84db5f3d4..78b5654772fe216ae70d985352e1e8c00c7ae2fd 100644 (file)
@@ -36,8 +36,8 @@
  *  Constructor
  */
 //=============================================================================
-VTKPlugin_IOperations::VTKPlugin_IOperations( GEOM_Engine* theEngine, int theDocID )
-: GEOMImpl_IBaseIEOperations( theEngine, theDocID )
+VTKPlugin_IOperations::VTKPlugin_IOperations( GEOM_Engine* theEngine )
+: GEOMImpl_IBaseIEOperations( theEngine )
 {
   MESSAGE( "VTKPlugin_IOperations::VTKPlugin_IOperations" );
 }
@@ -72,7 +72,7 @@ void VTKPlugin_IOperations::ExportVTK( const Handle(GEOM_Object)      theOrigina
   if( aRefFunction.IsNull() ) return;  //There is no function which creates an object to be exported
 
   //Add a new result object
-  Handle(GEOM_Object) result = GetEngine()->AddObject( GetDocID(), GEOM_IMPORT);
+  Handle(GEOM_Object) result = GetEngine()->AddObject( GEOM_IMPORT);
 
   //Add an Export function
   Handle(GEOM_Function) aFunction = result->AddFunction( VTKPlugin_ExportDriver::GetID(), EXPORT_SHAPE );
index a75d60833ce1597b3ba56bd93486a86f13f0541c..d97fd13152a09b49aaab75eeec4fae335e8b7f51 100644 (file)
@@ -30,7 +30,7 @@
 class VTKPLUGINENGINE_EXPORT VTKPlugin_IOperations: public GEOMImpl_IBaseIEOperations
 {
 public:
-  VTKPlugin_IOperations( GEOM_Engine*, int );
+  VTKPlugin_IOperations( GEOM_Engine* );
   ~VTKPlugin_IOperations();
 
   void ExportVTK( const Handle(GEOM_Object),
index ffc854106f1ab764c455ef0e1be5891725c01ca8..6ddef22dfa9f1462fb974807ed9854649d5a4a88 100644 (file)
@@ -31,6 +31,8 @@
 // OCCT includes
 #include <TFunction_DriverTable.hxx>
 
+VTKPlugin_IOperations* VTKPlugin_OperationsCreator::_operation;
+
 VTKPlugin_OperationsCreator::VTKPlugin_OperationsCreator()
 {
   // Register drivers
@@ -52,6 +54,12 @@ GEOM_IOperations_i* VTKPlugin_OperationsCreator::Create( PortableServer::POA_ptr
 {
   Unexpect aCatch( SALOME_SalomeException );
   MESSAGE( "VTKPlugin_OperationsCreator::Create" );
-  VTKPlugin_IOperations* anOperation = new VTKPlugin_IOperations( theGenImpl );
-  return new VTKPlugin_IOperations_i( thePOA, theEngine, anOperation );
+  return new VTKPlugin_IOperations_i( thePOA, theEngine, get( theGenImpl ) );
+}
+
+VTKPlugin_IOperations* VTKPlugin_OperationsCreator::get( ::GEOMImpl_Gen* theGenImpl )
+{
+  if( !_operation )
+    _operation = new VTKPlugin_IOperations( theGenImpl );
+  return _operation;
 }
index feea41fd979dd513a2524373319582ece6e61278..dfefb2954efa395ab562be9af4358ee94258c2ca 100755 (executable)
@@ -43,6 +43,11 @@ public:
   GEOM_IOperations_i* Create( PortableServer::POA_ptr thePOA,
                               GEOM::GEOM_Gen_ptr      theEngine,
                               ::GEOMImpl_Gen*         theGenImpl );
+private:
+  static VTKPlugin_IOperations* get(::GEOMImpl_Gen* theGenImpl);
+
+private:
+  static VTKPlugin_IOperations* _operation;
 
   friend class VTKPlugin_IECallBack;
 };
index 7992926b79deb1749e9f25e3cb26b45ab4b53b88..b69073baf4b16c59a358a51d843b0992c429a01a 100644 (file)
@@ -47,13 +47,12 @@ XAOPlugin_IECallBack::~XAOPlugin_IECallBack()
  */
 //=============================================================================
 bool
-XAOPlugin_IECallBack::Export( int                            theDocId,
-                             const Handle(GEOM_Object)      theOriginal,
-                             const TCollection_AsciiString& theFileName,
-                             const TCollection_AsciiString& theFormatName )
+XAOPlugin_IECallBack::Export( const Handle(GEOM_Object)      theOriginal,
+                              const TCollection_AsciiString& theFileName,
+                              const TCollection_AsciiString& theFormatName )
 {
-  XAOPlugin_IOperations* aPluginOperations = XAOPlugin_OperationsCreator::get( GetEngine(), theDocId );
-  GEOMImpl_IShapesOperations* aShapesOperations = GetEngine()->GetIShapesOperations( theDocId );
+  XAOPlugin_IOperations* aPluginOperations = XAOPlugin_OperationsCreator::get( GetEngine() );
+  GEOMImpl_IShapesOperations* aShapesOperations = GetEngine()->GetIShapesOperations();
 
   Handle(TColStd_HSequenceOfTransient) groups = aShapesOperations->GetExistingSubObjects( theOriginal, GEOMImpl_IShapesOperations::Groups );
   Handle(TColStd_HSequenceOfTransient) fields = aShapesOperations->GetExistingSubObjects( theOriginal, GEOMImpl_IShapesOperations::Fields );
@@ -73,11 +72,10 @@ XAOPlugin_IECallBack::Export( int                            theDocId,
  */
 //=============================================================================
 Handle(TColStd_HSequenceOfTransient)
-XAOPlugin_IECallBack::Import( int                            theDocId,
-                             const TCollection_AsciiString& theFormatName,
-                             const TCollection_AsciiString& theFileName )
+XAOPlugin_IECallBack::Import( const TCollection_AsciiString& theFormatName,
+                              const TCollection_AsciiString& theFileName )
 {
-  XAOPlugin_IOperations* aPluginOperations = XAOPlugin_OperationsCreator::get( GetEngine(), theDocId );
+  XAOPlugin_IOperations* aPluginOperations = XAOPlugin_OperationsCreator::get( GetEngine() );
 
   Handle(TColStd_HSequenceOfTransient) result = new TColStd_HSequenceOfTransient();
   Handle(TColStd_HSequenceOfTransient) subshapes = new TColStd_HSequenceOfTransient();
index d1f04cec5467cbb757f4191f2fa9117d0596ef0f..98e16b71765b698474beab73d985697ef2ca0884 100644 (file)
@@ -36,15 +36,13 @@ public:
   XAOPlugin_IECallBack();
   ~XAOPlugin_IECallBack();
   
-  virtual bool Export( int                            theDocId,
-                      const Handle(GEOM_Object)      theOriginal,
-                      const TCollection_AsciiString& theFileName,
-                      const TCollection_AsciiString& theFormatName );
+  virtual bool Export( const Handle(GEOM_Object)      theOriginal,
+                       const TCollection_AsciiString& theFileName,
+                       const TCollection_AsciiString& theFormatName );
 
   virtual
-  Handle(TColStd_HSequenceOfTransient) Import( int                            theDocId,
-                                              const TCollection_AsciiString& theFormatName,
-                                              const TCollection_AsciiString& theFileName );
+  Handle(TColStd_HSequenceOfTransient) Import( const TCollection_AsciiString& theFormatName,
+                                               const TCollection_AsciiString& theFileName );
 };
 
 #endif
index d33a5deaf69d0675c2e1e164270ffa1d350ecb8d..64c1d8581bee95b725b9679cead58ec03f49af65 100644 (file)
@@ -99,8 +99,8 @@ TopAbs_ShapeEnum getGroupDimension(XAO::Group* group)
  *  Constructor
  */
 //=============================================================================
-XAOPlugin_IOperations::XAOPlugin_IOperations( GEOM_Engine* theEngine, int theDocID )
-: GEOMImpl_IBaseIEOperations( theEngine, theDocID )
+XAOPlugin_IOperations::XAOPlugin_IOperations( GEOM_Engine* theEngine )
+: GEOMImpl_IBaseIEOperations( theEngine )
 {
   MESSAGE( "XAOPlugin_IOperations::XAOPlugin_IOperations" );
 }
@@ -322,7 +322,7 @@ bool XAOPlugin_IOperations::ExportXAO( Handle(GEOM_Object) shape,
   if (lastFunction.IsNull()) return false;
 
   // add a new result object
-  Handle(GEOM_Object) result = GetEngine()->AddObject(GetDocID(), GEOM_IMPORT);
+  Handle(GEOM_Object) result = GetEngine()->AddObject(GEOM_IMPORT);
 
   // add an Export function
   Handle(GEOM_Function) exportFunction = result->AddFunction(XAOPlugin_Driver::GetID(), EXPORT_SHAPE);
@@ -408,7 +408,7 @@ void XAOPlugin_IOperations::importSubShapes( XAO::Geometry* xaoGeometry,
     anArray = new TColStd_HArray1OfInteger(1, 1);
     anArray->SetValue(1, iref);
 
-    subShape = GetEngine()->AddObject(GetDocID(), GEOM_SUBSHAPE);
+    subShape = GetEngine()->AddObject(GEOM_SUBSHAPE);
     Handle(GEOM_Function) aFunction = subShape->AddFunction(GEOM_Object::GetSubShapeID(), 1);
     if (aFunction.IsNull())
       return;
@@ -472,7 +472,7 @@ bool XAOPlugin_IOperations::ImportXAO( const char* fileName,
   }
 
   // create the shape
-  shape = GetEngine()->AddObject(GetDocID(), GEOM_IMPORT);
+  shape = GetEngine()->AddObject(GEOM_IMPORT);
   Handle(GEOM_Function) function = shape->AddFunction(XAOPlugin_Driver::GetID(), IMPORT_SHAPE);
   if (function.IsNull()) return false;
   if (function->GetDriverGUID() != XAOPlugin_Driver::GetID()) return false;
index 65e42d42c80fcbc81caf8371b2e04476d2bc1e07..85b064484a7b675ca498c67c2b250adfa713071f 100644 (file)
@@ -40,7 +40,7 @@ namespace XAO {
 class XAOPLUGINENGINE_EXPORT XAOPlugin_IOperations: public GEOMImpl_IBaseIEOperations
 {
 public:
-  XAOPlugin_IOperations( GEOM_Engine*, int );
+  XAOPlugin_IOperations( GEOM_Engine* );
   ~XAOPlugin_IOperations();
 
   bool ExportXAO( Handle(GEOM_Object) shape,
index e2876fd5ed925bd8c2a68ff00eb2f511267a6ce2..4240ec9531378843c9d9dd45a6f03f8ae58e9e15 100644 (file)
@@ -31,6 +31,8 @@
 // OCCT includes
 #include <TFunction_DriverTable.hxx>
 
+XAOPlugin_IOperations* XAOPlugin_OperationsCreator::_operation;
+
 XAOPlugin_OperationsCreator::XAOPlugin_OperationsCreator()
 {
   // Register drivers
@@ -51,6 +53,12 @@ GEOM_IOperations_i* XAOPlugin_OperationsCreator::Create( PortableServer::POA_ptr
 {
   Unexpect aCatch( SALOME_SalomeException );
   MESSAGE( "XAOPlugin_OperationsCreator::Create" );
-  XAOPlugin_IOperations* anOperation = new XAOPlugin_IOperations( theGenImpl );
-  return new XAOPlugin_IOperations_i( thePOA, theEngine, anOperation );
+  return new XAOPlugin_IOperations_i( thePOA, theEngine, get( theGenImpl ) );
+}
+
+XAOPlugin_IOperations* XAOPlugin_OperationsCreator::get( ::GEOMImpl_Gen* theGenImpl )
+{
+  if( !_operation )
+    _operation = new XAOPlugin_IOperations( theGenImpl );
+  return _operation;
 }
index 3811bc68a1120b02f510d3f167bad238e48c72b6..26d645d8365743e4b464f741953d94e340ef705d 100755 (executable)
@@ -43,6 +43,11 @@ public:
   GEOM_IOperations_i* Create( PortableServer::POA_ptr thePOA,
                               GEOM::GEOM_Gen_ptr      theEngine,
                               ::GEOMImpl_Gen*         theGenImpl );
+private:
+  static XAOPlugin_IOperations* get(::GEOMImpl_Gen* theGenImpl);
+
+private:
+  static XAOPlugin_IOperations* _operation;
 
   friend class XAOPlugin_IECallBack;
 };