KiCad PCB EDA Suite
Loading...
Searching...
No Matches
footprint_filter.h File Reference
#include <boost/iterator/iterator_facade.hpp>
#include <eda_pattern_match.h>
#include <footprint_info.h>
#include <wx/arrstr.h>

Go to the source code of this file.

Classes

class  FOOTPRINT_FILTER
 Footprint display filter. More...
 
class  FOOTPRINT_FILTER::ITERATOR
 Inner iterator class returned by begin() and end(). More...
 

Functions

bool FootprintFilterMatchesName (const EDA_PATTERN_MATCH &aFilter, const wxString &aLibNickname, const wxString &aFootprintName)
 Whether a given footprint matches a specified filter.
 

Function Documentation

◆ FootprintFilterMatchesName()

bool FootprintFilterMatchesName ( const EDA_PATTERN_MATCH & aFilter,
const wxString & aLibNickname,
const wxString & aFootprintName )

Whether a given footprint matches a specified filter.

A filter containing ':' is matched against "library:footprint". Any other filter against the footprint name alone. Matching ignores case.

Parameters
aFilterthe pattern match filter. This must be lower-cased.
aLibNicknamethe nickname of the library containing the footprint.
aFootprintNamethe name of the footprint to check against the filter.
Returns
true if the footprint matches the filter, false otherwise.

Definition at line 126 of file footprint_filter.cpp.

References EDA_PATTERN_MATCH::Find(), EDA_PATTERN_MATCH::GetPattern(), and EDA_PATTERN_MATCH::FIND_RESULT::valid().

Referenced by FOOTPRINT_FILTER::ITERATOR::FootprintFilterMatch().