KiCad PCB EDA Suite
Loading...
Searching...
No Matches
PCBEXPR_EVALUATOR Class Reference

#include <pcbexpr_evaluator.h>

Public Member Functions

 PCBEXPR_EVALUATOR (LIBEVAL::UNIT_RESOLVER *aUnitResolver)
 
 ~PCBEXPR_EVALUATOR ()
 
bool Evaluate (const wxString &aExpr)
 
int Result () const
 
EDA_UNITS Units () const
 
void SetErrorCallback (std::function< void(const wxString &aMessage, int aOffset)> aCallback)
 
bool IsErrorPending () const
 
const LIBEVAL::ERROR_STATUSGetError () const
 

Private Attributes

int m_result
 
EDA_UNITS m_units
 
PCBEXPR_COMPILER m_compiler
 
PCBEXPR_UCODE m_ucode
 
LIBEVAL::ERROR_STATUS m_errorStatus
 

Detailed Description

Definition at line 243 of file pcbexpr_evaluator.h.

Constructor & Destructor Documentation

◆ PCBEXPR_EVALUATOR()

PCBEXPR_EVALUATOR::PCBEXPR_EVALUATOR ( LIBEVAL::UNIT_RESOLVER * aUnitResolver)

Definition at line 751 of file pcbexpr_evaluator.cpp.

References m_compiler, m_errorStatus, m_result, m_ucode, m_units, and MM.

◆ ~PCBEXPR_EVALUATOR()

PCBEXPR_EVALUATOR::~PCBEXPR_EVALUATOR ( )

Definition at line 761 of file pcbexpr_evaluator.cpp.

Member Function Documentation

◆ Evaluate()

bool PCBEXPR_EVALUATOR::Evaluate ( const wxString & aExpr)

◆ GetError()

const LIBEVAL::ERROR_STATUS & PCBEXPR_EVALUATOR::GetError ( ) const
inline

Definition at line 259 of file pcbexpr_evaluator.h.

References m_errorStatus.

◆ IsErrorPending()

bool PCBEXPR_EVALUATOR::IsErrorPending ( ) const
inline

Definition at line 258 of file pcbexpr_evaluator.h.

References m_errorStatus.

◆ Result()

int PCBEXPR_EVALUATOR::Result ( ) const
inline

Definition at line 250 of file pcbexpr_evaluator.h.

References m_result.

Referenced by DRC_RULES_PARSER::parseValueWithUnits().

◆ SetErrorCallback()

void PCBEXPR_EVALUATOR::SetErrorCallback ( std::function< void(const wxString &aMessage, int aOffset)> aCallback)
inline

Definition at line 253 of file pcbexpr_evaluator.h.

References m_compiler.

Referenced by DRC_RULES_PARSER::parseValueWithUnits().

◆ Units()

EDA_UNITS PCBEXPR_EVALUATOR::Units ( ) const
inline

Definition at line 251 of file pcbexpr_evaluator.h.

References m_units.

Referenced by DRC_RULES_PARSER::parseValueWithUnits().

Member Data Documentation

◆ m_compiler

PCBEXPR_COMPILER PCBEXPR_EVALUATOR::m_compiler
private

Definition at line 265 of file pcbexpr_evaluator.h.

Referenced by Evaluate(), PCBEXPR_EVALUATOR(), and SetErrorCallback().

◆ m_errorStatus

LIBEVAL::ERROR_STATUS PCBEXPR_EVALUATOR::m_errorStatus
private

Definition at line 267 of file pcbexpr_evaluator.h.

Referenced by GetError(), IsErrorPending(), and PCBEXPR_EVALUATOR().

◆ m_result

int PCBEXPR_EVALUATOR::m_result
private

Definition at line 262 of file pcbexpr_evaluator.h.

Referenced by Evaluate(), PCBEXPR_EVALUATOR(), and Result().

◆ m_ucode

PCBEXPR_UCODE PCBEXPR_EVALUATOR::m_ucode
private

Definition at line 266 of file pcbexpr_evaluator.h.

Referenced by PCBEXPR_EVALUATOR().

◆ m_units

EDA_UNITS PCBEXPR_EVALUATOR::m_units
private

Definition at line 263 of file pcbexpr_evaluator.h.

Referenced by Evaluate(), PCBEXPR_EVALUATOR(), and Units().


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