KiCad PCB EDA Suite
|
#include <pcb_expr_evaluator.h>
Public Member Functions | |
PCB_EXPR_EVALUATOR (LIBEVAL::UNIT_RESOLVER *aUnitResolver) | |
~PCB_EXPR_EVALUATOR () | |
bool | Evaluate (const wxString &aExpr) |
int | Result () const |
void | SetErrorCallback (std::function< void(const wxString &aMessage, int aOffset)> aCallback) |
bool | IsErrorPending () const |
const LIBEVAL::ERROR_STATUS & | GetError () const |
Private Attributes | |
int | m_result |
PCB_EXPR_COMPILER | m_compiler |
PCB_EXPR_UCODE | m_ucode |
LIBEVAL::ERROR_STATUS | m_errorStatus |
Definition at line 226 of file pcb_expr_evaluator.h.
PCB_EXPR_EVALUATOR::PCB_EXPR_EVALUATOR | ( | LIBEVAL::UNIT_RESOLVER * | aUnitResolver | ) |
Definition at line 344 of file pcb_expr_evaluator.cpp.
PCB_EXPR_EVALUATOR::~PCB_EXPR_EVALUATOR | ( | ) |
Definition at line 353 of file pcb_expr_evaluator.cpp.
bool PCB_EXPR_EVALUATOR::Evaluate | ( | const wxString & | aExpr | ) |
Definition at line 358 of file pcb_expr_evaluator.cpp.
References LIBEVAL::VALUE::AsDouble(), LIBEVAL::COMPILER::Compile(), F_Cu, LIBEVAL::VALUE::GetType(), KiROUND(), m_compiler, m_result, NULL_CONSTRAINT, LIBEVAL::UCODE::Run(), and LIBEVAL::VT_NUMERIC.
Referenced by DRC_RULES_PARSER::parseValueWithUnits().
|
inline |
|
inline |
Definition at line 240 of file pcb_expr_evaluator.h.
References m_errorStatus, and LIBEVAL::ERROR_STATUS::pendingError.
|
inline |
Definition at line 233 of file pcb_expr_evaluator.h.
References m_result.
Referenced by DRC_RULES_PARSER::parseValueWithUnits().
|
inline |
Definition at line 235 of file pcb_expr_evaluator.h.
References m_compiler, and LIBEVAL::COMPILER::SetErrorCallback().
Referenced by DRC_RULES_PARSER::parseValueWithUnits().
|
private |
Definition at line 246 of file pcb_expr_evaluator.h.
Referenced by Evaluate(), and SetErrorCallback().
|
private |
Definition at line 248 of file pcb_expr_evaluator.h.
Referenced by GetError(), and IsErrorPending().
|
private |
Definition at line 244 of file pcb_expr_evaluator.h.
Referenced by Evaluate(), and Result().
|
private |
Definition at line 247 of file pcb_expr_evaluator.h.