| 
    KiCad PCB EDA Suite
    
   | 
 
#include <numeric_evaluator.h>
Classes | |
| struct | Token | 
| struct | TokenStat | 
Public Member Functions | |
| NUMERIC_EVALUATOR (EDA_UNITS aUnits) | |
| ~NUMERIC_EVALUATOR () | |
| void | Clear () | 
| void | SetDefaultUnits (EDA_UNITS aUnits) | 
| void | LocaleChanged () | 
| void | parseError (const char *s) | 
| void | parseOk () | 
| void | parseSetResult (double) | 
| bool | IsValid () const | 
| wxString | Result () const | 
| bool | Process (const wxString &aString) | 
| wxString | OriginalText () const | 
| void | SetVar (const wxString &aString, double aValue) | 
| double | GetVar (const wxString &aString) | 
| void | RemoveVar (const wxString &aString) | 
| void | ClearVar () | 
Protected Member Functions | |
| void | newString (const wxString &aString) | 
| Token | getToken () | 
| void | parse (int token, numEval::TokenType value) | 
Private Types | |
| enum class | Unit {  Invalid , UM , MM , CM , Inch , Mil , Degrees , SI , Femtoseconds , Picoseconds , PsPerInch , PsPerCm , PsPerMm }  | 
Private Attributes | |
| void * | m_parser | 
| struct NUMERIC_EVALUATOR::TokenStat | m_token | 
| char | m_localeDecimalSeparator | 
| bool | m_parseError | 
| bool | m_parseFinished | 
| Unit | m_defaultUnits | 
| wxString | m_originalText | 
| std::map< wxString, double > | m_varMap | 
Definition at line 95 of file numeric_evaluator.h.
      
  | 
  strongprivate | 
| Enumerator | |
|---|---|
| Invalid | |
| UM | |
| MM | |
| CM | |
| Inch | |
| Mil | |
| Degrees | |
| SI | |
| Femtoseconds | |
| Picoseconds | |
| PsPerInch | |
| PsPerCm | |
| PsPerMm | |
Definition at line 97 of file numeric_evaluator.h.
| NUMERIC_EVALUATOR::NUMERIC_EVALUATOR | ( | EDA_UNITS | aUnits | ) | 
Definition at line 47 of file numeric_evaluator.cpp.
References LocaleChanged(), m_parseError, m_parseFinished, m_parser, and SetDefaultUnits().
| NUMERIC_EVALUATOR::~NUMERIC_EVALUATOR | ( | ) | 
Definition at line 60 of file numeric_evaluator.cpp.
| void NUMERIC_EVALUATOR::Clear | ( | ) | 
Definition at line 71 of file numeric_evaluator.cpp.
References m_originalText, m_parseError, and m_token.
Referenced by newString(), and ~NUMERIC_EVALUATOR().
      
  | 
  inline | 
Definition at line 157 of file numeric_evaluator.h.
References m_varMap.
      
  | 
  protected | 
Definition at line 195 of file numeric_evaluator.cpp.
References CM, Degrees, DIVIDE, dummy, numEval::TokenType::dValue, ENDS, Femtoseconds, Inch, Invalid, m_defaultUnits, m_localeDecimalSeparator, m_parseError, m_token, Mil, MINUS, MM, Picoseconds, PLUS, PsPerCm, PsPerInch, PsPerMm, SI, numEval::TokenType::text, NUMERIC_EVALUATOR::Token::token, UM, numEval::TokenType::valid, VALUE, and NUMERIC_EVALUATOR::Token::value.
Referenced by Process().
| double NUMERIC_EVALUATOR::GetVar | ( | const wxString & | aString | ) | 
Definition at line 589 of file numeric_evaluator.cpp.
References m_parseError, and m_varMap.
      
  | 
  inline | 
Definition at line 133 of file numeric_evaluator.h.
References m_parseError.
| void NUMERIC_EVALUATOR::LocaleChanged | ( | ) | 
Definition at line 100 of file numeric_evaluator.cpp.
References m_localeDecimalSeparator.
Referenced by NUMERIC_EVALUATOR().
      
  | 
  protected | 
Definition at line 179 of file numeric_evaluator.cpp.
References Clear(), m_originalText, m_parseFinished, and m_token.
Referenced by Process().
| wxString NUMERIC_EVALUATOR::OriginalText | ( | ) | const | 
Definition at line 141 of file numeric_evaluator.cpp.
References m_originalText.
      
  | 
  protected | 
| void NUMERIC_EVALUATOR::parseError | ( | const char * | s | ) | 
Definition at line 108 of file numeric_evaluator.cpp.
References m_parseError.
| void NUMERIC_EVALUATOR::parseOk | ( | ) | 
Definition at line 115 of file numeric_evaluator.cpp.
References m_parseFinished.
| void NUMERIC_EVALUATOR::parseSetResult | ( | double | val | ) | 
Definition at line 122 of file numeric_evaluator.cpp.
References m_token, and UIDouble2Str().
| bool NUMERIC_EVALUATOR::Process | ( | const wxString & | aString | ) | 
Definition at line 147 of file numeric_evaluator.cpp.
References ENDS, getToken(), m_parseError, m_parseFinished, m_parser, newString(), NUMERIC_EVALUATOR::Token::token, and NUMERIC_EVALUATOR::Token::value.
      
  | 
  inline | 
Definition at line 154 of file numeric_evaluator.h.
References m_varMap.
      
  | 
  inline | 
Definition at line 136 of file numeric_evaluator.h.
References m_token.
| void NUMERIC_EVALUATOR::SetDefaultUnits | ( | EDA_UNITS | aUnits | ) | 
Definition at line 81 of file numeric_evaluator.cpp.
References DEGREES, Degrees, Femtoseconds, FS, INCH, Inch, m_defaultUnits, Mil, MILS, MM, MM, Picoseconds, PS, PS_PER_CM, PS_PER_INCH, PS_PER_MM, PsPerCm, PsPerInch, PsPerMm, SI, and UNSCALED.
Referenced by NUMERIC_EVALUATOR().
| void NUMERIC_EVALUATOR::SetVar | ( | const wxString & | aString, | 
| double | aValue ) | 
Definition at line 583 of file numeric_evaluator.cpp.
References m_varMap.
      
  | 
  private | 
Definition at line 203 of file numeric_evaluator.h.
Referenced by getToken(), and SetDefaultUnits().
      
  | 
  private | 
Definition at line 197 of file numeric_evaluator.h.
Referenced by getToken(), and LocaleChanged().
      
  | 
  private | 
Definition at line 205 of file numeric_evaluator.h.
Referenced by Clear(), newString(), and OriginalText().
      
  | 
  private | 
Definition at line 200 of file numeric_evaluator.h.
Referenced by Clear(), getToken(), GetVar(), IsValid(), NUMERIC_EVALUATOR(), parseError(), and Process().
      
  | 
  private | 
Definition at line 201 of file numeric_evaluator.h.
Referenced by newString(), NUMERIC_EVALUATOR(), parseOk(), and Process().
      
  | 
  private | 
Definition at line 177 of file numeric_evaluator.h.
Referenced by NUMERIC_EVALUATOR(), Process(), and ~NUMERIC_EVALUATOR().
      
  | 
  private | 
Referenced by Clear(), getToken(), newString(), parseSetResult(), and Result().
      
  | 
  private | 
Definition at line 207 of file numeric_evaluator.h.
Referenced by ClearVar(), GetVar(), RemoveVar(), and SetVar().