35#include <wx/tokenzr.h>
38 const wxString& aFootprintName )
40 if( aFootprintName.IsEmpty() )
43 for( std::unique_ptr<FOOTPRINT_INFO>& fp :
m_list )
45 if( aLibNickname == fp->GetLibNickname() && aFootprintName == fp->GetFootprintName() )
55 if( aFootprintName.IsEmpty() )
60 wxCHECK_MSG( fpid.
Parse( aFootprintName ) < 0,
nullptr,
61 wxString::Format( wxT(
"'%s' is not a valid LIB_ID." ), aFootprintName ) );
69 std::vector<SEARCH_TERM> terms;
75 wxStringTokenizer keywordTokenizer(
GetKeywords(),
" \t\r\n", wxTOKEN_STRTOK );
77 while( keywordTokenizer.HasMoreTokens() )
78 terms.emplace_back(
SEARCH_TERM( keywordTokenizer.GetNextToken(), 4 ) );
113 while( std::unique_ptr<IO_ERROR> error =
PopError() )
115 if( !messages.IsEmpty() )
116 messages += wxS(
"\n" );
118 messages += error->Problem();
A logical library item identifier and consists of various portions much like a URI.
int Parse(const UTF8 &aId, bool aFix=false)
Parse LIB_ID with the information from aId.
const UTF8 & GetLibItemName() const
const UTF8 & GetLibNickname() const
Return the logical library name portion of a LIB_ID.
void Format(OUTPUTFORMATTER *out, int aNestLevel, int aCtl, const CPTREE &aTree)
Output a PTREE into s-expression format via an OUTPUTFORMATTER derivative.
int StrNumCmp(const wxString &aString1, const wxString &aString2, bool aIgnoreCase)
Compare two strings with alphanumerical content.
A structure for storing weighted search terms.