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
 
void SetErrorCallback (std::function< void(const wxString &aMessage, int aOffset)> aCallback)
 
bool IsErrorPending () const
 
const LIBEVAL::ERROR_STATUSGetError () const
 

Private Attributes

int m_result
 
PCBEXPR_COMPILER m_compiler
 
PCBEXPR_UCODE m_ucode
 
LIBEVAL::ERROR_STATUS m_errorStatus
 

Detailed Description

Definition at line 221 of file pcbexpr_evaluator.h.

Constructor & Destructor Documentation

◆ PCBEXPR_EVALUATOR()

PCBEXPR_EVALUATOR::PCBEXPR_EVALUATOR ( LIBEVAL::UNIT_RESOLVER aUnitResolver)

Definition at line 469 of file pcbexpr_evaluator.cpp.

◆ ~PCBEXPR_EVALUATOR()

PCBEXPR_EVALUATOR::~PCBEXPR_EVALUATOR ( )

Definition at line 478 of file pcbexpr_evaluator.cpp.

Member Function Documentation

◆ Evaluate()

◆ GetError()

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

Definition at line 236 of file pcbexpr_evaluator.h.

References m_errorStatus.

◆ IsErrorPending()

bool PCBEXPR_EVALUATOR::IsErrorPending ( ) const
inline

Definition at line 235 of file pcbexpr_evaluator.h.

References m_errorStatus, and LIBEVAL::ERROR_STATUS::pendingError.

◆ Result()

int PCBEXPR_EVALUATOR::Result ( ) const
inline

Definition at line 228 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

Member Data Documentation

◆ m_compiler

PCBEXPR_COMPILER PCBEXPR_EVALUATOR::m_compiler
private

Definition at line 241 of file pcbexpr_evaluator.h.

Referenced by Evaluate(), and SetErrorCallback().

◆ m_errorStatus

LIBEVAL::ERROR_STATUS PCBEXPR_EVALUATOR::m_errorStatus
private

Definition at line 243 of file pcbexpr_evaluator.h.

Referenced by GetError(), and IsErrorPending().

◆ m_result

int PCBEXPR_EVALUATOR::m_result
private

Definition at line 239 of file pcbexpr_evaluator.h.

Referenced by Evaluate(), and Result().

◆ m_ucode

PCBEXPR_UCODE PCBEXPR_EVALUATOR::m_ucode
private

Definition at line 242 of file pcbexpr_evaluator.h.


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