0028564: Support of applications using old persistence (ShapeSchema)
[occt.git] / src / StdLPersistent / StdLPersistent_Document.cxx
index b311af4..7b20456 100644 (file)
@@ -14,6 +14,7 @@
 #include <StdLPersistent_Document.hxx>
 #include <StdLPersistent_Data.hxx>
 #include <StdObjMgt_ReadData.hxx>
+#include <StdObjMgt_WriteData.hxx>
 
 #include <TDocStd_Document.hxx>
 #include <TDocStd_Owner.hxx>
@@ -28,6 +29,24 @@ void StdLPersistent_Document::Read (StdObjMgt_ReadData& theReadData)
   theReadData >> myData;
 }
 
+//=======================================================================
+//function : Write
+//purpose  : Write persistent data to a file
+//=======================================================================
+void StdLPersistent_Document::Write (StdObjMgt_WriteData& theWriteData) const
+{
+  theWriteData << myData;
+}
+
+//=======================================================================
+//function : PChildren
+//purpose  : Gets persistent child objects
+//=======================================================================
+void StdLPersistent_Document::PChildren(StdObjMgt_Persistent::SequenceOfPersistent& theChildren) const
+{
+  theChildren.Append(myData);
+}
+
 //=======================================================================
 //function : Import
 //purpose  : Import transient document from the persistent data