]> SALOME platform Git repositories - modules/geom.git/blobdiff - src/GEOM/GEOM_Engine.cxx
Salome HOME
0023445: EDF 14284 - Problem with Dump Python
[modules/geom.git] / src / GEOM / GEOM_Engine.cxx
index ac1216f5a27922600c4eb93f3c2011d5867b53cb..f7ae8fc8e82a29a7217fa2d1dbebecc175e989ee 100644 (file)
 
 #include <Resource_DataMapIteratorOfDataMapOfAsciiStringAsciiString.hxx>
 
+#if OCC_VERSION_LARGE > 0x07000000
+#include <BinDrivers.hxx>
+#include <StdDrivers_DocumentRetrievalDriver.hxx>
+#include <PCDM_StorageDriver.hxx>
+#endif
+
 #include <set>
 
 #include <Standard_Failure.hxx>
@@ -225,6 +231,11 @@ GEOM_Engine::GEOM_Engine()
   TFunction_DriverTable::Get()->AddDriver(GEOM_Object::GetSubShapeID(), new GEOM_SubShapeDriver());
   
   _OCAFApp = new GEOM_Application();
+#if OCC_VERSION_LARGE > 0x07000000
+  _OCAFApp->DefineFormat("SALOME_GEOM", "GEOM Document Version 1.0", "sgd",
+                         new StdDrivers_DocumentRetrievalDriver, 0);
+  BinDrivers::DefineFormat(_OCAFApp);
+#endif
   _UndoLimit = 0;
 }
 
@@ -1842,7 +1853,7 @@ void PublishObject (TObjectData&                              theObjectData,
 
     // store aCreationCommand before publishing commands
     int tag = GetTag(theObjectData._entry);
-    theEntryToCmdMap.insert( std::make_pair( tag + 2*theEntry2ObjData.size(), aCreationCommand ));
+    theEntryToCmdMap.insert( std::make_pair( tag + -2*theEntry2ObjData.size(), aCreationCommand ));
   }
 
   // make a command