29 #ifndef EDA_PATTERN_MATCH_H 30 #define EDA_PATTERN_MATCH_H 36 #include <wx/string.h> 57 explicit operator bool()
const 69 virtual bool SetPattern(
const wxString& aPattern ) = 0;
74 virtual wxString
const&
GetPattern()
const = 0;
81 virtual FIND_RESULT
Find(
const wxString& aCandidate )
const = 0;
91 virtual bool SetPattern(
const wxString& aPattern )
override;
92 virtual wxString
const&
GetPattern()
const override;
106 virtual bool SetPattern(
const wxString& aPattern )
override;
107 virtual wxString
const&
GetPattern()
const override;
119 virtual bool SetPattern(
const wxString& aPattern )
override;
120 virtual wxString
const&
GetPattern()
const override;
131 virtual bool SetPattern(
const wxString& aPattern )
override;
151 virtual bool SetPattern(
const wxString& aPattern )
override;
152 virtual wxString
const&
GetPattern()
const override;
154 int FindOne(
const wxString& aCandidate )
const;
167 static const std::map<wxString, double>
m_units;
186 bool Find(
const wxString &aTerm,
int& aMatchersTriggered,
int& aPosition );
192 void AddMatcher(
const wxString &aPattern, std::unique_ptr<EDA_PATTERN_MATCH> aMatcher );
198 #endif // EDA_PATTERN_MATCH_H std::vector< std::unique_ptr< EDA_PATTERN_MATCH > > m_matchers
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)=0
Set the pattern against which candidates will be matched.
int FindOne(const wxString &aCandidate) const
wxString const & GetPattern() const
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.
void AddMatcher(const wxString &aPattern, std::unique_ptr< EDA_PATTERN_MATCH > aMatcher)
virtual bool SetPattern(const wxString &aPattern) override
Set the pattern against which candidates will be matched.
virtual ~EDA_PATTERN_MATCH()
virtual bool SetPattern(const wxString &aPattern) override
Set the pattern against which candidates will be matched.
wxString m_wildcard_pattern
virtual bool SetPattern(const wxString &aPattern) override
Set the pattern against which candidates will be matched.
bool Find(const wxString &aTerm, int &aMatchersTriggered, int &aPosition)
static const int EDA_PATTERN_NOT_FOUND
virtual bool SetPattern(const wxString &aPattern) override
Set the pattern against which candidates will be matched.
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 wxString const & GetPattern() const override
Return the pattern passed to SetPattern().
static wxRegEx m_regex_description
static wxRegEx m_regex_search
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 =0
Return the pattern passed to SetPattern().
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 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...
EDA_COMBINED_MATCHER(const wxString &aPattern)
static const std::map< wxString, double > m_units