+#if wxUSE_STD_IOSTREAM
+wxSTD ostream& DoodleSegment::SaveObject(wxSTD ostream& stream)
+{
+ wxInt32 n = lines.GetCount();
+ stream << n << _T('\n');
+
+ wxList::compatibility_iterator node = lines.GetFirst();
+ while (node)
+ {
+ DoodleLine *line = (DoodleLine *)node->GetData();
+ stream << line->x1 << _T(" ") <<
+ line->y1 << _T(" ") <<
+ line->x2 << _T(" ") <<
+ line->y2 << _T("\n");
+ node = node->GetNext();
+ }
+
+ return stream;
+}
+#else
+wxOutputStream &DoodleSegment::SaveObject(wxOutputStream& stream)