KiCad PCB EDA Suite
numEval::NUMERIC_EVALUATOR Class Reference

Classes

struct  Token
 
struct  TokenStat
 

Public Member Functions

 NUMERIC_EVALUATOR (EDA_UNITS_T aUnits, bool aUseMils=false)
 
 ~NUMERIC_EVALUATOR ()
 
void Clear ()
 
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  Unit { Unit::Invalid, Unit::Metric, Unit::Inch, Unit::Mil }
 

Private Attributes

void * m_parser
 
struct numEval::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
 

Detailed Description

Definition at line 95 of file numeric_evaluator.cpp.

Member Enumeration Documentation

◆ Unit

Enumerator
Invalid 
Metric 
Inch 
Mil 

Definition at line 97 of file numeric_evaluator.cpp.

Constructor & Destructor Documentation

◆ NUMERIC_EVALUATOR()

numEval::NUMERIC_EVALUATOR::NUMERIC_EVALUATOR ( EDA_UNITS_T  aUnits,
bool  aUseMils = false 
)

◆ ~NUMERIC_EVALUATOR()

numEval::NUMERIC_EVALUATOR::~NUMERIC_EVALUATOR ( )

Member Function Documentation

◆ Clear()

void numEval::NUMERIC_EVALUATOR::Clear ( )

◆ ClearVar()

void numEval::NUMERIC_EVALUATOR::ClearVar ( )
inline

Definition at line 138 of file numeric_evaluator.cpp.

143 {

◆ getToken()

Token numEval::NUMERIC_EVALUATOR::getToken ( )
protected

◆ GetVar()

double numEval::NUMERIC_EVALUATOR::GetVar ( const wxString &  aString)

◆ IsValid()

bool numEval::NUMERIC_EVALUATOR::IsValid ( ) const
inline

Definition at line 114 of file numeric_evaluator.cpp.

114 {

◆ newString()

void numEval::NUMERIC_EVALUATOR::newString ( const wxString &  aString)
protected

◆ OriginalText()

wxString numEval::NUMERIC_EVALUATOR::OriginalText ( ) const

◆ parse()

void numEval::NUMERIC_EVALUATOR::parse ( int  token,
numEval::TokenType  value 
)
protected

◆ parseError()

void numEval::NUMERIC_EVALUATOR::parseError ( const char *  s)

◆ parseOk()

void numEval::NUMERIC_EVALUATOR::parseOk ( )

◆ parseSetResult()

void numEval::NUMERIC_EVALUATOR::parseSetResult ( double  )

◆ Process()

bool numEval::NUMERIC_EVALUATOR::Process ( const wxString &  aString)

◆ RemoveVar()

void numEval::NUMERIC_EVALUATOR::RemoveVar ( const wxString &  aString)
inline

Definition at line 135 of file numeric_evaluator.cpp.

137 {

◆ Result()

wxString numEval::NUMERIC_EVALUATOR::Result ( ) const
inline

Definition at line 117 of file numeric_evaluator.cpp.

◆ SetVar()

void numEval::NUMERIC_EVALUATOR::SetVar ( const wxString &  aString,
double  aValue 
)

Member Data Documentation

◆ m_defaultUnits

Unit numEval::NUMERIC_EVALUATOR::m_defaultUnits
private

Definition at line 178 of file numeric_evaluator.cpp.

◆ m_localeDecimalSeparator

char numEval::NUMERIC_EVALUATOR::m_localeDecimalSeparator
private

Definition at line 172 of file numeric_evaluator.cpp.

◆ m_originalText

wxString numEval::NUMERIC_EVALUATOR::m_originalText
private

Definition at line 180 of file numeric_evaluator.cpp.

◆ m_parseError

bool numEval::NUMERIC_EVALUATOR::m_parseError
private

Definition at line 175 of file numeric_evaluator.cpp.

◆ m_parseFinished

bool numEval::NUMERIC_EVALUATOR::m_parseFinished
private

Definition at line 176 of file numeric_evaluator.cpp.

◆ m_parser

void* numEval::NUMERIC_EVALUATOR::m_parser
private

Definition at line 158 of file numeric_evaluator.cpp.

◆ m_token

struct numEval::NUMERIC_EVALUATOR::TokenStat numEval::NUMERIC_EVALUATOR::m_token
private

◆ m_varMap

std::map<wxString, double> numEval::NUMERIC_EVALUATOR::m_varMap
private

Definition at line 182 of file numeric_evaluator.cpp.


The documentation for this class was generated from the following file: