29 #ifndef EDA_PATTERN_MATCH_H 30 #define EDA_PATTERN_MATCH_H 35 #include <wx/string.h> 56 explicit operator bool()
const 68 virtual bool SetPattern(
const wxString& aPattern ) = 0;
73 virtual wxString
const&
GetPattern()
const = 0;
80 virtual FIND_RESULT
Find(
const wxString& aCandidate )
const = 0;
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;
119 virtual wxString
const&
GetPattern()
const override;
130 virtual bool SetPattern(
const wxString& aPattern )
override;
150 virtual bool SetPattern(
const wxString& aPattern )
override;
151 virtual wxString
const&
GetPattern()
const override;
153 int FindOne(
const wxString& aCandidate )
const;
166 static const std::map<wxString, double>
m_units;
185 bool Find(
const wxString& aTerm,
int& aMatchersTriggered,
int& aPosition );
191 void AddMatcher(
const wxString& aPattern, std::unique_ptr<EDA_PATTERN_MATCH> aMatcher );
197 #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
const wxString & 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