23#include <wx/tokenzr.h>
36 m_pos( aOther.m_pos ),
37 m_filter( aOther.m_filter )
52 if( !m_filter || !m_filter->m_list || m_filter->m_list->GetCount() == 0 )
58 int filter_type = m_filter->m_filter_type;
60 wxString& lib_name = m_filter->m_lib_name;
62 for( ++m_pos; m_pos < list->
GetCount(); ++m_pos )
71 if( !PinCountMatch( candidate ) )
77 if( !lib_name.IsEmpty() && !candidate.
InLibrary( lib_name ) )
83 if( !FootprintFilterMatch( candidate ) )
91 for( std::unique_ptr<EDA_COMBINED_MATCHER>& matcher : m_filter->m_pattern_filters )
95 if( !matcher->ScoreTerms( searchTerms ) )
115 return ( m_pos == aOther.
m_pos ) && ( m_filter == aOther.
m_filter || m_pos == (size_t) -1 );
121 if( m_filter && m_filter->m_list && m_pos < m_filter->
m_list->
GetCount() )
122 return m_filter->m_list->GetItem( m_pos );
124 throw std::out_of_range(
"Attempt to dereference past FOOTPRINT_FILTER::end()" );
130 if( m_filter->m_footprint_filters.empty() )
136 for(
const std::unique_ptr<EDA_PATTERN_MATCH>& each_filter : m_filter->m_footprint_filters )
141 if( each_filter->GetPattern().Contains( wxS(
":" ) ) )
146 if( each_filter->Find(
name ) )
156 return m_filter->m_pin_count >= 0
171 m_filter_type( UNFILTERED_FP_LIST )
206 for(
const wxString& each_pattern : aFilters )
220 wxStringTokenizer tokenizer( aPattern.Lower() );
222 while( tokenizer.HasMoreTokens() )
224 const wxString term = tokenizer.GetNextToken().Lower();