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

Enumerator
Invalid 
Metric 
Inch 
Mil 

Definition at line 97 of file numeric_evaluator.cpp.

97 {

Constructor & Destructor Documentation

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

Member Function Documentation

void numEval::NUMERIC_EVALUATOR::Clear ( )
void numEval::NUMERIC_EVALUATOR::ClearVar ( )
inline

Definition at line 138 of file numeric_evaluator.cpp.

140 {
Token numEval::NUMERIC_EVALUATOR::getToken ( )
protected
double numEval::NUMERIC_EVALUATOR::GetVar ( const wxString &  aString)
bool numEval::NUMERIC_EVALUATOR::IsValid ( ) const
inline

Definition at line 114 of file numeric_evaluator.cpp.

void numEval::NUMERIC_EVALUATOR::newString ( const wxString &  aString)
protected
wxString numEval::NUMERIC_EVALUATOR::OriginalText ( ) const
void numEval::NUMERIC_EVALUATOR::parse ( int  token,
numEval::TokenType  value 
)
protected
void numEval::NUMERIC_EVALUATOR::parseError ( const char *  s)
void numEval::NUMERIC_EVALUATOR::parseOk ( )
void numEval::NUMERIC_EVALUATOR::parseSetResult ( double  )
bool numEval::NUMERIC_EVALUATOR::Process ( const wxString &  aString)
void numEval::NUMERIC_EVALUATOR::RemoveVar ( const wxString &  aString)
inline

Definition at line 135 of file numeric_evaluator.cpp.

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

Definition at line 117 of file numeric_evaluator.cpp.

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

Member Data Documentation

Unit numEval::NUMERIC_EVALUATOR::m_defaultUnits
private

Definition at line 178 of file numeric_evaluator.cpp.

char numEval::NUMERIC_EVALUATOR::m_localeDecimalSeparator
private

Definition at line 172 of file numeric_evaluator.cpp.

wxString numEval::NUMERIC_EVALUATOR::m_originalText
private

Definition at line 180 of file numeric_evaluator.cpp.

bool numEval::NUMERIC_EVALUATOR::m_parseError
private

Definition at line 175 of file numeric_evaluator.cpp.

bool numEval::NUMERIC_EVALUATOR::m_parseFinished
private

Definition at line 176 of file numeric_evaluator.cpp.

Referenced by numEval::PARSE_ERROR::PARSE_ERROR().

void* numEval::NUMERIC_EVALUATOR::m_parser
private

Definition at line 158 of file numeric_evaluator.cpp.

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

Definition at line 182 of file numeric_evaluator.cpp.

Referenced by NUMERIC_EVALUATOR::SetVar().


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