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

#include <pcbexpr_evaluator.h>

Inheritance diagram for PCBEXPR_CONTEXT:
LIBEVAL::CONTEXT

Public Member Functions

 PCBEXPR_CONTEXT (int aConstraint, PCB_LAYER_ID aLayer)
 
void SetItems (BOARD_ITEM *a, BOARD_ITEM *b=nullptr)
 
BOARDGetBoard () const
 
int GetConstraint () const
 
BOARD_ITEMGetItem (int index) const
 
PCB_LAYER_ID GetLayer () const
 
VALUE * AllocValue ()
 
VALUE * StoreValue (VALUE *aValue)
 
void Push (VALUE *v)
 
VALUE * Pop ()
 
int SP () const
 
void SetErrorCallback (std::function< void(const wxString &aMessage, int aOffset)> aCallback)
 
bool HasErrorCallback ()
 
void ReportError (const wxString &aErrorMsg)
 

Private Attributes

int m_constraint
 
BOARD_ITEMm_items [2]
 
PCB_LAYER_ID m_layer
 
std::vector< VALUE * > m_ownedValues
 
VALUE * m_stack [100]
 
int m_stackPtr
 
std::function< void(const wxString &aMessage, int aOffset)> m_errorCallback
 

Detailed Description

Definition at line 52 of file pcbexpr_evaluator.h.

Constructor & Destructor Documentation

◆ PCBEXPR_CONTEXT()

PCBEXPR_CONTEXT::PCBEXPR_CONTEXT ( int  aConstraint,
PCB_LAYER_ID  aLayer 
)
inline

Definition at line 55 of file pcbexpr_evaluator.h.

References m_items.

Member Function Documentation

◆ AllocValue()

◆ GetBoard()

BOARD * PCBEXPR_CONTEXT::GetBoard ( ) const

Definition at line 404 of file pcbexpr_evaluator.cpp.

References BOARD_ITEM::GetBoard(), and m_items.

Referenced by PCBEXPR_VAR_REF::GetValue().

◆ GetConstraint()

int PCBEXPR_CONTEXT::GetConstraint ( ) const
inline

Definition at line 71 of file pcbexpr_evaluator.h.

References m_constraint.

Referenced by isCoupledDiffPairFunc().

◆ GetItem()

BOARD_ITEM * PCBEXPR_CONTEXT::GetItem ( int  index) const
inline

◆ GetLayer()

PCB_LAYER_ID PCBEXPR_CONTEXT::GetLayer ( ) const
inline

◆ HasErrorCallback()

◆ Pop()

◆ Push()

◆ ReportError()

◆ SetErrorCallback()

void LIBEVAL::CONTEXT::SetErrorCallback ( std::function< void(const wxString &aMessage, int aOffset)>  aCallback)
inlineinherited

◆ SetItems()

void PCBEXPR_CONTEXT::SetItems ( BOARD_ITEM a,
BOARD_ITEM b = nullptr 
)
inline

Definition at line 63 of file pcbexpr_evaluator.h.

References m_items.

Referenced by DRC_RULE_CONDITION::EvaluateFor(), and testEvalExpr().

◆ SP()

int LIBEVAL::CONTEXT::SP ( ) const
inlineinherited

Definition at line 349 of file libeval_compiler.h.

References LIBEVAL::CONTEXT::m_stackPtr.

Referenced by LIBEVAL::UCODE::Run().

◆ StoreValue()

VALUE * LIBEVAL::CONTEXT::StoreValue ( VALUE aValue)
inlineinherited

Definition at line 327 of file libeval_compiler.h.

References LIBEVAL::CONTEXT::m_ownedValues.

Referenced by LIBEVAL::UOP::Exec().

Member Data Documentation

◆ m_constraint

int PCBEXPR_CONTEXT::m_constraint
private

Definition at line 76 of file pcbexpr_evaluator.h.

Referenced by GetConstraint().

◆ m_errorCallback

std::function<void( const wxString& aMessage, int aOffset )> LIBEVAL::CONTEXT::m_errorCallback
privateinherited

◆ m_items

BOARD_ITEM* PCBEXPR_CONTEXT::m_items[2]
private

Definition at line 77 of file pcbexpr_evaluator.h.

Referenced by GetBoard(), GetItem(), PCBEXPR_CONTEXT(), and SetItems().

◆ m_layer

PCB_LAYER_ID PCBEXPR_CONTEXT::m_layer
private

Definition at line 78 of file pcbexpr_evaluator.h.

Referenced by GetLayer().

◆ m_ownedValues

std::vector<VALUE*> LIBEVAL::CONTEXT::m_ownedValues
privateinherited

◆ m_stack

VALUE* LIBEVAL::CONTEXT::m_stack[100]
privateinherited

Definition at line 365 of file libeval_compiler.h.

Referenced by LIBEVAL::CONTEXT::Pop(), and LIBEVAL::CONTEXT::Push().

◆ m_stackPtr

int LIBEVAL::CONTEXT::m_stackPtr
privateinherited

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