KiCad PCB EDA Suite
Loading...
Searching...
No Matches
footprint_filter.cpp File Reference
#include <footprint_filter.h>
#include <stdexcept>
#include <wx/tokenzr.h>

Go to the source code of this file.

Typedefs

using FOOTPRINT_FILTER_IT = FOOTPRINT_FILTER::ITERATOR
 

Functions

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

Typedef Documentation

◆ FOOTPRINT_FILTER_IT

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().