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 239 of file pcbexpr_evaluator.h.

Constructor & Destructor Documentation

◆ PCBEXPR_EVALUATOR()

PCBEXPR_EVALUATOR::PCBEXPR_EVALUATOR ( LIBEVAL::UNIT_RESOLVER aUnitResolver)

Definition at line 585 of file pcbexpr_evaluator.cpp.

◆ ~PCBEXPR_EVALUATOR()

PCBEXPR_EVALUATOR::~PCBEXPR_EVALUATOR ( )

Definition at line 594 of file pcbexpr_evaluator.cpp.

Member Function Documentation

◆ Evaluate()

◆ GetError()

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

Definition at line 254 of file pcbexpr_evaluator.h.

References m_errorStatus.

◆ IsErrorPending()

bool PCBEXPR_EVALUATOR::IsErrorPending ( ) const
inline

Definition at line 253 of file pcbexpr_evaluator.h.

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

◆ Result()

int PCBEXPR_EVALUATOR::Result ( ) const
inline

Definition at line 246 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 259 of file pcbexpr_evaluator.h.

Referenced by Evaluate(), and SetErrorCallback().

◆ m_errorStatus

LIBEVAL::ERROR_STATUS PCBEXPR_EVALUATOR::m_errorStatus
private

Definition at line 261 of file pcbexpr_evaluator.h.

Referenced by GetError(), and IsErrorPending().

◆ m_result

int PCBEXPR_EVALUATOR::m_result
private

Definition at line 257 of file pcbexpr_evaluator.h.

Referenced by Evaluate(), and Result().

◆ m_ucode

PCBEXPR_UCODE PCBEXPR_EVALUATOR::m_ucode
private

Definition at line 260 of file pcbexpr_evaluator.h.


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