KiCad PCB EDA Suite
numEval::NumericEvaluator Class Reference

Classes

struct  Token
 
struct  TokenStat
 

Public Member Functions

 NumericEvaluator ()
 
 ~NumericEvaluator ()
 
void init ()
 
void clear (const void *pObj=nullptr)
 
void setDecimalSeparator (char sep)
 
void enableTextInputStorage (bool w)
 
void parseError (const char *s)
 
void parseOk ()
 
void parseSetResult (double)
 
bool isValid () const
 
const char * result () const
 
bool process (const char *s)
 
bool process (const char *s, const void *pObj)
 
const char * textInput (const void *pObj) const
 
void setVar (const std::string &, double value)
 
double getVar (const std::string &)
 
void removeVar (const std::string &s)
 
void clearVar ()
 

Protected Member Functions

void newString (const char *s)
 
Token getToken ()
 
void parse (int token, numEval::TokenType value)
 

Private Types

enum  Unit { Unit::Invalid, Unit::Metric, Unit::Inch, Unit::Mil }
 

Private Attributes

void * pClParser
 
struct numEval::NumericEvaluator::TokenStat clToken
 
char cClDecSep
 
bool bClError
 
bool bClParseFinished
 
bool bClTextInputStorage
 
Unit eClUnitDefault
 
std::map< const void *, std::string > clObjMap
 
std::map< std::string, double > clVarMap
 

Detailed Description

Definition at line 94 of file numeric_evaluator.cpp.

Member Enumeration Documentation

enum numEval::NumericEvaluator::Unit
strongprivate
Enumerator
Invalid 
Metric 
Inch 
Mil 

Definition at line 95 of file numeric_evaluator.cpp.

Constructor & Destructor Documentation

numEval::NumericEvaluator::NumericEvaluator ( )
numEval::NumericEvaluator::~NumericEvaluator ( )

Member Function Documentation

void numEval::NumericEvaluator::clear ( const void *  pObj = nullptr)
void numEval::NumericEvaluator::clearVar ( )
inline

Definition at line 150 of file numeric_evaluator.cpp.

159 {
void numEval::NumericEvaluator::enableTextInputStorage ( bool  w)
inline

Definition at line 115 of file numeric_evaluator.cpp.

Token numEval::NumericEvaluator::getToken ( )
protected
double numEval::NumericEvaluator::getVar ( const std::string &  )
void numEval::NumericEvaluator::init ( )
bool numEval::NumericEvaluator::isValid ( ) const
inline

Definition at line 123 of file numeric_evaluator.cpp.

void numEval::NumericEvaluator::newString ( const char *  s)
protected
void numEval::NumericEvaluator::parse ( int  token,
numEval::TokenType  value 
)
protected
void numEval::NumericEvaluator::parseError ( const char *  s)
void numEval::NumericEvaluator::parseOk ( )
void numEval::NumericEvaluator::parseSetResult ( double  )
bool numEval::NumericEvaluator::process ( const char *  s)
bool numEval::NumericEvaluator::process ( const char *  s,
const void *  pObj 
)
void numEval::NumericEvaluator::removeVar ( const std::string &  s)
inline

Definition at line 147 of file numeric_evaluator.cpp.

147 {
const char* numEval::NumericEvaluator::result ( ) const
inline

Definition at line 126 of file numeric_evaluator.cpp.

References NumericEvaluator::bClParseFinished.

126 {
void numEval::NumericEvaluator::setDecimalSeparator ( char  sep)
void numEval::NumericEvaluator::setVar ( const std::string &  ,
double  value 
)
const char* numEval::NumericEvaluator::textInput ( const void *  pObj) const

Member Data Documentation

bool numEval::NumericEvaluator::bClError
private

Definition at line 184 of file numeric_evaluator.cpp.

bool numEval::NumericEvaluator::bClParseFinished
private

Definition at line 185 of file numeric_evaluator.cpp.

bool numEval::NumericEvaluator::bClTextInputStorage
private

Definition at line 187 of file numeric_evaluator.cpp.

char numEval::NumericEvaluator::cClDecSep
private

Definition at line 181 of file numeric_evaluator.cpp.

std::map<const void*, std::string> numEval::NumericEvaluator::clObjMap
private

Definition at line 191 of file numeric_evaluator.cpp.

struct numEval::NumericEvaluator::TokenStat numEval::NumericEvaluator::clToken
private
std::map<std::string, double> numEval::NumericEvaluator::clVarMap
private

Definition at line 192 of file numeric_evaluator.cpp.

Unit numEval::NumericEvaluator::eClUnitDefault
private

Definition at line 189 of file numeric_evaluator.cpp.

void* numEval::NumericEvaluator::pClParser
private

Definition at line 169 of file numeric_evaluator.cpp.


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