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=0, PCB_LAYER_ID aLayer=F_Cu)
 
void SetItems (BOARD_ITEM *a, BOARD_ITEM *b=nullptr)
 
BOARDGetBoard () const
 
int GetConstraint () const
 
BOARD_ITEMGetItem (int index) const
 
PCB_LAYER_ID GetLayer () const
 
VALUEAllocValue ()
 
VALUEStoreValue (VALUE *aValue)
 
void Push (VALUE *v)
 
VALUEPop ()
 
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
 
VALUEm_stack [100]
 
int m_stackPtr
 
std::function< void(const wxString &aMessage, int aOffset)> m_errorCallback
 

Detailed Description

Definition at line 54 of file pcbexpr_evaluator.h.

Constructor & Destructor Documentation

◆ PCBEXPR_CONTEXT()

PCBEXPR_CONTEXT::PCBEXPR_CONTEXT ( int aConstraint = 0,
PCB_LAYER_ID aLayer = F_Cu )
inline

Definition at line 57 of file pcbexpr_evaluator.h.

References F_Cu, m_constraint, m_items, and m_layer.

Member Function Documentation

◆ AllocValue()

◆ GetBoard()

BOARD * PCBEXPR_CONTEXT::GetBoard ( ) const

Definition at line 664 of file pcbexpr_evaluator.cpp.

References m_items.

Referenced by PCBEXPR_VAR_REF::GetValue().

◆ GetConstraint()

int PCBEXPR_CONTEXT::GetConstraint ( ) const
inline

Definition at line 73 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()

◆ SP()

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

Definition at line 381 of file libeval_compiler.h.

References m_stackPtr.

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

◆ StoreValue()

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

Definition at line 359 of file libeval_compiler.h.

References m_ownedValues.

Referenced by LIBEVAL::UOP::Exec(), and LIBEVAL::UCODE::Run().

Member Data Documentation

◆ m_constraint

int PCBEXPR_CONTEXT::m_constraint
private

Definition at line 78 of file pcbexpr_evaluator.h.

Referenced by GetConstraint(), and PCBEXPR_CONTEXT().

◆ m_errorCallback

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

Definition at line 400 of file libeval_compiler.h.

Referenced by HasErrorCallback(), ReportError(), and SetErrorCallback().

◆ m_items

BOARD_ITEM* PCBEXPR_CONTEXT::m_items[2]
private

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

Referenced by GetLayer(), and PCBEXPR_CONTEXT().

◆ m_ownedValues

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

Definition at line 396 of file libeval_compiler.h.

Referenced by AllocValue(), CONTEXT(), StoreValue(), and ~CONTEXT().

◆ m_stack

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

Definition at line 397 of file libeval_compiler.h.

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

◆ m_stackPtr

int LIBEVAL::CONTEXT::m_stackPtr
privateinherited

Definition at line 398 of file libeval_compiler.h.

Referenced by CONTEXT(), Pop(), Push(), and SP().


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