本文整理汇总了C++中DoodleSegment::LoadObject方法的典型用法代码示例。如果您正苦于以下问题:C++ DoodleSegment::LoadObject方法的具体用法?C++ DoodleSegment::LoadObject怎么用?C++ DoodleSegment::LoadObject使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DoodleSegment
的用法示例。
在下文中一共展示了DoodleSegment::LoadObject方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: stream
DocumentIstream& DrawingDocument::LoadObject(DocumentIstream& istream)
{
#if wxUSE_STD_IOSTREAM
DocumentIstream& stream = istream;
#else
wxTextInputStream stream(istream);
#endif
wxDocument::LoadObject(istream);
wxInt32 count = 0;
stream >> count;
if ( count < 0 )
{
wxLogWarning("Drawing document corrupted: invalid segments count.");
#if wxUSE_STD_IOSTREAM
istream.clear(std::ios::badbit);
#else
istream.Reset(wxSTREAM_READ_ERROR);
#endif
return istream;
}
for ( int n = 0; n < count; n++ )
{
DoodleSegment segment;
segment.LoadObject(istream);
m_doodleSegments.push_back(segment);
}
return istream;
}
示例2:
wxSTD istream& DrawingDocument::LoadObject(wxSTD istream& stream)
{
wxDocument::LoadObject(stream);
wxInt32 n = 0;
stream >> n;
for (int i = 0; i < n; i++)
{
DoodleSegment *segment = new DoodleSegment;
segment->LoadObject(stream);
doodleSegments.Append(segment);
}
return stream;
}
示例3: stream
DocumentIstream& DrawingDocument::LoadObject(DocumentIstream& istream)
{
#if wxUSE_STD_IOSTREAM
DocumentIstream& stream = istream;
#else
wxTextInputStream stream(istream);
#endif
wxDocument::LoadObject(istream);
wxInt32 count = 0;
stream >> count;
for ( int n = 0; n < count; n++ )
{
DoodleSegment segment;
segment.LoadObject(istream);
m_doodleSegments.push_back(segment);
}
return istream;
}