0029355: OCCT 6.9.1 persistence restored in OCCT 7.2.0 not working
[occt.git] / src / StdObject / StdObject_Shape.hxx
index 58d0111..7d1ab80 100644 (file)
@@ -48,23 +48,25 @@ protected:
   Standard_Integer                     myOrient;
 
   friend StdObjMgt_ReadData& operator >>
-    (StdObjMgt_ReadData::Object, StdObject_Shape&);
+    (StdObjMgt_ReadData&, StdObject_Shape&);
   friend StdObjMgt_WriteData& operator <<
-    (StdObjMgt_WriteData::Object, const StdObject_Shape&);
+    (StdObjMgt_WriteData&, const StdObject_Shape&);
 };
 
 //! Read persistent data from a file.
 inline StdObjMgt_ReadData& operator >>
-  (StdObjMgt_ReadData::Object theReadData, StdObject_Shape& theShape)
+  (StdObjMgt_ReadData& theReadData, StdObject_Shape& theShape)
 {
+  StdObjMgt_ReadData::ObjectSentry aSentry (theReadData);
   theShape.read (theReadData);
   return theReadData;
 }
 
 //! Write persistent data to a file.
 inline StdObjMgt_WriteData& operator <<
-  (StdObjMgt_WriteData::Object theWriteData, const StdObject_Shape& theShape)
+  (StdObjMgt_WriteData& theWriteData, const StdObject_Shape& theShape)
 {
+  StdObjMgt_WriteData::ObjectSentry aSentry (theWriteData);
   theShape.write (theWriteData);
   return theWriteData;
 }