29#ifndef EDA_PATTERN_MATCH_H
30#define EDA_PATTERN_MATCH_H
56 explicit operator bool()
const
90 virtual bool SetPattern(
const wxString& aPattern )
override;
91 virtual wxString
const&
GetPattern()
const override;
105 virtual bool SetPattern(
const wxString& aPattern )
override;
106 virtual wxString
const&
GetPattern()
const override;
118 virtual bool SetPattern(
const wxString& aPattern )
override;
125 virtual bool SetPattern(
const wxString& aPattern )
override;
126 virtual wxString
const&
GetPattern()
const override;
137 virtual bool SetPattern(
const wxString& aPattern )
override;
157 virtual bool SetPattern(
const wxString& aPattern )
override;
158 virtual wxString
const&
GetPattern()
const override;
160 int FindOne(
const wxString& aCandidate )
const;
173 static const std::map<wxString, double>
m_units;
199 bool Find(
const wxString& aTerm,
int& aMatchersTriggered,
int& aPosition );
205 void AddMatcher(
const wxString& aPattern, std::unique_ptr<EDA_PATTERN_MATCH> aMatcher );
std::vector< std::unique_ptr< EDA_PATTERN_MATCH > > m_matchers
void AddMatcher(const wxString &aPattern, std::unique_ptr< EDA_PATTERN_MATCH > aMatcher)
EDA_COMBINED_MATCHER(const wxString &aPattern, COMBINED_MATCHER_CONTEXT aContext)
bool Find(const wxString &aTerm, int &aMatchersTriggered, int &aPosition)
const wxString & GetPattern() const
virtual bool SetPattern(const wxString &aPattern) override
Set the pattern against which candidates will be matched.
virtual wxString const & GetPattern() const override
Return the pattern passed to SetPattern().
virtual FIND_RESULT Find(const wxString &aCandidate) const override
Return the location and possibly length of a match iff a given candidate string matches the set patte...
virtual bool SetPattern(const wxString &aPattern) override
Set the pattern against which candidates will be matched.
virtual bool SetPattern(const wxString &aPattern) override
Set the pattern against which candidates will be matched.
static wxRegEx m_regex_search
int FindOne(const wxString &aCandidate) const
static wxRegEx m_regex_description
virtual FIND_RESULT Find(const wxString &aCandidate) const override
Return the location and possibly length of a match iff a given candidate string matches the set patte...
virtual wxString const & GetPattern() const override
Return the pattern passed to SetPattern().
static const std::map< wxString, double > m_units
virtual wxString const & GetPattern() const override
Return the pattern passed to SetPattern().
virtual bool SetPattern(const wxString &aPattern) override
Set the pattern against which candidates will be matched.
virtual FIND_RESULT Find(const wxString &aCandidate) const override
Return the location and possibly length of a match iff a given candidate string matches the set patte...
virtual bool SetPattern(const wxString &aPattern) override
Set the pattern against which candidates will be matched.
virtual FIND_RESULT Find(const wxString &aCandidate) const override
Return the location and possibly length of a match iff a given candidate string matches the set patte...
wxString m_wildcard_pattern
virtual bool SetPattern(const wxString &aPattern) override
Set the pattern against which candidates will be matched.
virtual wxString const & GetPattern() const override
Return the pattern passed to SetPattern().
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