bool CFilterManager::FilenameFiltered(const wxString& name, bool dir, wxLongLong size, bool local, int attributes) const { wxASSERT(m_currentFilterSet < m_filterSets.size()); const CFilterSet& set = m_filterSets[m_currentFilterSet]; // Check active filters for (unsigned int i = 0; i < m_filters.size(); i++) { if (local) { if (set.local[i]) if (FilenameFilteredByFilter(name, dir, size, i, attributes)) return true; } else { if (set.remote[i]) if (FilenameFilteredByFilter(name, dir, size, i, attributes)) return true; } } return false; }
bool CFilterManager::FilenameFiltered(const wxString& name, const wxString& path, bool dir, wxLongLong size, bool local, int attributes, CDateTime const& date) const { if (m_filters_disabled) return false; wxASSERT(m_globalCurrentFilterSet < m_globalFilterSets.size()); const CFilterSet& set = m_globalFilterSets[m_globalCurrentFilterSet]; // Check active filters for (unsigned int i = 0; i < m_globalFilters.size(); ++i) { if (local) { if (set.local[i]) if (FilenameFilteredByFilter(m_globalFilters[i], name, path, dir, size, attributes, date)) return true; } else { if (set.remote[i]) if (FilenameFilteredByFilter(m_globalFilters[i], name, path, dir, size, attributes, date)) return true; } } return false; }
bool CFilterManager::FilenameFiltered(std::vector<CFilter> const& filters, const wxString& name, const wxString& path, bool dir, wxLongLong size, bool local, int attributes, CDateTime const& date) const { for (auto const& filter : filters) { if (FilenameFilteredByFilter(filter, name, path, dir, size, attributes, date)) return true; } return false; }
bool CFilterManager::FilenameFiltered(const std::list<CFilter> &filters, const wxString& name, const wxString& path, bool dir, wxLongLong size, bool local, int attributes) const { for (std::list<CFilter>::const_iterator iter = filters.begin(); iter != filters.end(); iter++) { if (FilenameFilteredByFilter(*iter, name, path, dir, size, attributes)) return true; } return false; }