mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-10-02 01:03:19 +02:00
9146b9b261
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1440 8ced0084-cf51-0410-be5f-012b33b47a6e
43 lines
1.2 KiB
C++
43 lines
1.2 KiB
C++
/////////////////////////////////////////////////////////////////////////////
|
|
// Name: src/common/filtfind.cpp
|
|
// Purpose: Streams for filter formats
|
|
// Author: Mike Wetherell
|
|
// RCS-ID: $Id: filtfind.cpp 42412 2006-10-25 20:41:12Z MW $
|
|
// Copyright: (c) Mike Wetherell
|
|
// Licence: wxWindows licence
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// For compilers that support precompilation, includes "wx.h".
|
|
#include "wx/wxprec.h"
|
|
|
|
#ifdef __BORLANDC__
|
|
#pragma hdrstop
|
|
#endif
|
|
|
|
#if wxUSE_STREAMS
|
|
|
|
#include "wx/stream.h"
|
|
|
|
// These functions are in a separate file so that statically linked apps
|
|
// that do not call them to search for filter handlers will only link in
|
|
// the filter classes they use.
|
|
|
|
const wxFilterClassFactory *
|
|
wxFilterClassFactory::Find(const wxChar *protocol, wxStreamProtocolType type)
|
|
{
|
|
for (const wxFilterClassFactory *f = GetFirst(); f; f = f->GetNext())
|
|
if (f->CanHandle(protocol, type))
|
|
return f;
|
|
|
|
return NULL;
|
|
}
|
|
|
|
// static
|
|
const wxFilterClassFactory *wxFilterClassFactory::GetFirst()
|
|
{
|
|
if (!sm_first)
|
|
wxUseFilterClasses();
|
|
return sm_first;
|
|
}
|
|
|
|
#endif // wxUSE_STREAMS
|