| 
    KiCad PCB EDA Suite
    
   | 
 
Relational match. More...
#include <eda_pattern_match.h>
  
Public Member Functions | |
| 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 if a given candidate string matches the set pattern.   | |
| int | FindOne (const wxString &aCandidate) const | 
Protected Types | |
| enum | RELATION {  LT , LE , EQ , GE , GT , ANY }  | 
Protected Attributes | |
| wxString | m_pattern | 
| wxString | m_key | 
| RELATION | m_relation | 
| double | m_value | 
Static Protected Attributes | |
| static const std::map< wxString, double > | m_units | 
Relational match.
Matches tokens of the format:
key:value or key=value
with search patterns of the format:
key<value, key<=value, key=value, key>=value, key>value
by parsing the value numerically and comparing.
Definition at line 180 of file eda_pattern_match.h.
      
  | 
  protected | 
| Enumerator | |
|---|---|
| LT | |
| LE | |
| EQ | |
| GE | |
| GT | |
| ANY | |
Definition at line 190 of file eda_pattern_match.h.
      
  | 
  overridevirtual | 
Return the location and possibly length of a match if a given candidate string matches the set pattern.
Otherwise, return an invalid FIND_RESULT.
Implements EDA_PATTERN_MATCH.
Definition at line 308 of file eda_pattern_match.cpp.
References CLAMPED_VAL_INT_MAX, EDA_PATTERN_NOT_FOUND, and FindOne().
| int EDA_PATTERN_MATCH_RELATIONAL::FindOne | ( | const wxString & | aCandidate | ) | const | 
Definition at line 331 of file eda_pattern_match.cpp.
References ANY, CLAMPED_VAL_INT_MAX, EDA_PATTERN_NOT_FOUND, EQ, GE, GT, LE, LT, m_key, m_relation, m_units, and m_value.
Referenced by Find().
      
  | 
  overridevirtual | 
Return the pattern passed to SetPattern().
Implements EDA_PATTERN_MATCH.
Definition at line 302 of file eda_pattern_match.cpp.
References m_pattern.
      
  | 
  overridevirtual | 
Set the pattern against which candidates will be matched.
Implements EDA_PATTERN_MATCH.
Definition at line 248 of file eda_pattern_match.cpp.
References ANY, EQ, GE, GT, LE, LT, m_key, m_pattern, m_relation, m_units, and m_value.
      
  | 
  protected | 
Definition at line 193 of file eda_pattern_match.h.
Referenced by FindOne(), and SetPattern().
      
  | 
  protected | 
Definition at line 192 of file eda_pattern_match.h.
Referenced by GetPattern(), and SetPattern().
      
  | 
  protected | 
Definition at line 194 of file eda_pattern_match.h.
Referenced by FindOne(), and SetPattern().
      
  | 
  staticprotected | 
Definition at line 374 of file eda_pattern_match.h.
Referenced by FindOne(), and SetPattern().
      
  | 
  protected | 
Definition at line 195 of file eda_pattern_match.h.
Referenced by FindOne(), and SetPattern().