+#if wxUSE_STD_IOSTREAM
+wxSTD ostream& DrawingDocument::SaveObject(wxSTD ostream& stream)
+{
+ wxDocument::SaveObject(stream);
+
+ wxInt32 n = doodleSegments.GetCount();
+ stream << n << _T('\n');
+
+ wxList::compatibility_iterator node = doodleSegments.GetFirst();
+ while (node)
+ {
+ DoodleSegment *segment = (DoodleSegment *)node->GetData();
+ segment->SaveObject(stream);
+ stream << _T('\n');
+
+ node = node->GetNext();
+ }
+
+ return stream;
+}
+#else
+wxOutputStream& DrawingDocument::SaveObject(wxOutputStream& stream)