Factory some of wxFilterClassFactory into a base class.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42492 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1106,19 +1106,18 @@ wxFilterOutputStream::~wxFilterOutputStream()
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxFilterClassFactory
|
||||
// wxFilterClassFactoryBase
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
IMPLEMENT_ABSTRACT_CLASS(wxFilterClassFactory, wxObject)
|
||||
IMPLEMENT_ABSTRACT_CLASS(wxFilterClassFactoryBase, wxObject)
|
||||
|
||||
wxFilterClassFactory *wxFilterClassFactory::sm_first = NULL;
|
||||
|
||||
wxString wxFilterClassFactory::PopExtension(const wxString& location) const
|
||||
wxString wxFilterClassFactoryBase::PopExtension(const wxString& location) const
|
||||
{
|
||||
return location.substr(0, FindExtension(location));
|
||||
}
|
||||
|
||||
wxString::size_type wxFilterClassFactory::FindExtension(const wxChar *location) const
|
||||
wxString::size_type wxFilterClassFactoryBase::FindExtension(
|
||||
const wxChar *location) const
|
||||
{
|
||||
size_t len = wxStrlen(location);
|
||||
|
||||
@@ -1135,8 +1134,8 @@ wxString::size_type wxFilterClassFactory::FindExtension(const wxChar *location)
|
||||
return wxString::npos;
|
||||
}
|
||||
|
||||
bool wxFilterClassFactory::CanHandle(const wxChar *protocol,
|
||||
wxStreamProtocolType type) const
|
||||
bool wxFilterClassFactoryBase::CanHandle(const wxChar *protocol,
|
||||
wxStreamProtocolType type) const
|
||||
{
|
||||
if (type == wxSTREAM_FILEEXTENSION)
|
||||
return FindExtension(protocol) != wxString::npos;
|
||||
@@ -1148,6 +1147,14 @@ bool wxFilterClassFactory::CanHandle(const wxChar *protocol,
|
||||
return false;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxFilterClassFactory
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
IMPLEMENT_ABSTRACT_CLASS(wxFilterClassFactory, wxFilterClassFactoryBase)
|
||||
|
||||
wxFilterClassFactory *wxFilterClassFactory::sm_first = NULL;
|
||||
|
||||
void wxFilterClassFactory::Remove()
|
||||
{
|
||||
if (m_next != this)
|
||||
|
Reference in New Issue
Block a user