29#ifndef EDA_PATTERN_MATCH_H
30#define EDA_PATTERN_MATCH_H
77 explicit operator bool()
const
112 virtual bool SetPattern(
const wxString& aPattern )
override;
113 virtual wxString
const& GetPattern()
const override;
114 virtual FIND_RESULT Find(
const wxString& aCandidate )
const override;
128 virtual bool SetPattern(
const wxString& aPattern )
override;
129 virtual wxString
const& GetPattern()
const override;
130 virtual FIND_RESULT Find(
const wxString& aCandidate )
const override;
141 virtual bool SetPattern(
const wxString& aPattern )
override;
149 virtual bool SetPattern(
const wxString& aPattern )
override;
150 virtual wxString
const& GetPattern()
const override;
151 virtual FIND_RESULT Find(
const wxString& aCandidate )
const override;
161 virtual bool SetPattern(
const wxString& aPattern )
override;
181 virtual bool SetPattern(
const wxString& aPattern )
override;
182 virtual wxString
const& GetPattern()
const override;
183 virtual FIND_RESULT Find(
const wxString& aCandidate )
const override;
184 int FindOne(
const wxString& aCandidate )
const;
195 static const std::map<wxString, double>
m_units;
236 bool Find(
const wxString& aTerm,
int& aMatchersTriggered,
int& aPosition );
238 bool Find(
const wxString& aTerm );
240 bool StartsWith(
const wxString& aTerm );
242 const wxString& GetPattern()
const;
244 int ScoreTerms( std::vector<SEARCH_TERM>& aWeightedTerms );
248 void AddMatcher(
const wxString& aPattern, std::unique_ptr<EDA_PATTERN_MATCH> aMatcher );
std::vector< std::unique_ptr< EDA_PATTERN_MATCH > > m_matchers
EDA_COMBINED_MATCHER & operator=(EDA_COMBINED_MATCHER const &)=delete
EDA_COMBINED_MATCHER(EDA_COMBINED_MATCHER const &)=delete
static const std::map< wxString, double > m_units
wxString m_wildcard_pattern
virtual bool SetPattern(const wxString &aPattern)=0
Set the pattern against which candidates will be matched.
virtual wxString const & GetPattern() const =0
Return the pattern passed to SetPattern().
virtual FIND_RESULT Find(const wxString &aCandidate) const =0
Return the location and possibly length of a match iff a given candidate string matches the set patte...
virtual ~EDA_PATTERN_MATCH()
static const int EDA_PATTERN_NOT_FOUND
SEARCH_TERM(const wxString &aText, int aScore)