本文整理汇总了C++中wxInputStream::IsSeekable方法的典型用法代码示例。如果您正苦于以下问题:C++ wxInputStream::IsSeekable方法的具体用法?C++ wxInputStream::IsSeekable怎么用?C++ wxInputStream::IsSeekable使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类wxInputStream
的用法示例。
在下文中一共展示了wxInputStream::IsSeekable方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Load
bool wxAnimation::Load(wxInputStream &stream, wxAnimationType type)
{
UnRef();
const wxAnimationDecoder *handler;
if ( type == wxANIMATION_TYPE_ANY )
{
for ( wxAnimationDecoderList::compatibility_iterator node = sm_handlers.GetFirst();
node; node = node->GetNext() )
{
handler=(const wxAnimationDecoder*)node->GetData();
if ( handler->CanRead(stream) )
{
// do a copy of the handler from the static list which we will own
// as our reference data
m_refData = handler->Clone();
return M_ANIMDATA->Load(stream);
}
}
wxLogWarning( _("No handler found for animation type.") );
return false;
}
handler = FindHandler(type);
if (handler == NULL)
{
wxLogWarning( _("No animation handler for type %ld defined."), type );
return false;
}
// do a copy of the handler from the static list which we will own
// as our reference data
m_refData = handler->Clone();
if (stream.IsSeekable() && !M_ANIMDATA->CanRead(stream))
{
wxLogError(_("Animation file is not of type %ld."), type);
return false;
}
else
return M_ANIMDATA->Load(stream);
}