|
KiCad PCB EDA Suite
|
#include <pcbexpr_evaluator.h>
Public Member Functions | |
| PCBEXPR_CONTEXT (int aConstraint=0, PCB_LAYER_ID aLayer=F_Cu) | |
| void | SetItems (BOARD_ITEM *a, BOARD_ITEM *b=nullptr) |
| void | SetConstraint (int aConstraint) |
| void | SetLayer (PCB_LAYER_ID aLayer) |
| void | Reset () override |
| Rewind for reuse on the next evaluation (see LIBEVAL::CONTEXT::Reset()). | |
| void | SetTypeOverride (const BOARD_ITEM *aItem, KICAD_T aType) |
| KICAD_T | GetEffectiveType (const BOARD_ITEM *aItem) const |
| BOARD * | GetBoard () const |
| int | GetConstraint () const |
| BOARD_ITEM * | GetItem (int index) const |
| PCB_LAYER_ID | GetLayer () const |
| VALUE * | AllocValue () |
| VALUE * | StoreValue (VALUE *aValue) |
| void | Push (VALUE *v) |
| VALUE * | Pop () |
| VALUE * | Top () |
| Peek the top of the stack without popping (used by the short-circuit jumps). | |
| int | SP () const |
| void | SetErrorCallback (std::function< void(const wxString &aMessage, int aOffset)> aCallback) |
| bool | HasErrorCallback () |
| void | ReportError (const wxString &aErrorMsg) |
Private Member Functions | |
| VALUE * | inlineValue (std::size_t aIndex) |
Private Attributes | |
| int | m_constraint |
| BOARD_ITEM * | m_items [2] |
| PCB_LAYER_ID | m_layer |
| std::map< const BOARD_ITEM *, KICAD_T > | m_typeOverrides |
| std::vector< VALUE * > | m_ownedValues |
| VALUE * | m_stack [100] |
| int | m_stackPtr |
| unsigned char | m_inlineStorage [INLINE_VALUE_COUNT *sizeof(VALUE)] |
| std::size_t | m_inlineUsed |
| std::function< void(const wxString &aMessage, int aOffset)> | m_errorCallback |
Static Private Attributes | |
| static constexpr std::size_t | INLINE_VALUE_COUNT = 32 |
Definition at line 66 of file pcbexpr_evaluator.h.
|
inline |
Definition at line 69 of file pcbexpr_evaluator.h.
References F_Cu, m_constraint, m_items, and m_layer.
|
inlineinherited |
Definition at line 386 of file libeval_compiler.h.
References INLINE_VALUE_COUNT, inlineValue(), m_inlineUsed, m_ownedValues, and VALUE.
Referenced by enclosedByAreaFunc(), LIBEVAL::UOP::Exec(), existsOnLayerFunc(), fromToFunc(), LIBEVAL::COMPILER::generateUCode(), getFieldFunc(), hasComponentClassFunc(), hasExactNetclassFunc(), hasNetChainFunc(), hasNetclassFunc(), inDiffPairFunc(), inNetChainClassFunc(), inNetChainFunc(), intersectsAreaFunc(), intersectsBackCourtyardFunc(), intersectsCourtyardFunc(), intersectsFrontCourtyardFunc(), isBlindBuriedViaFunc(), isBlindVia(), isBuriedVia(), isCoupledDiffPairFunc(), isMicroVia(), isPlatedFunc(), memberOfFootprintFunc(), memberOfGroupFunc(), memberOfSheetFunc(), memberOfSheetOrChildrenFunc(), Pop(), and Top().
| BOARD * PCBEXPR_CONTEXT::GetBoard | ( | ) | const |
Definition at line 752 of file pcbexpr_evaluator.cpp.
References m_items.
Referenced by PCBEXPR_VAR_REF::GetValue().
|
inline |
Definition at line 103 of file pcbexpr_evaluator.h.
References m_constraint.
Referenced by enclosedByAreaFunc(), intersectsAreaFunc(), intersectsBackCourtyardFunc(), intersectsCourtyardFunc(), intersectsFrontCourtyardFunc(), and isCoupledDiffPairFunc().
| KICAD_T PCBEXPR_CONTEXT::GetEffectiveType | ( | const BOARD_ITEM * | aItem | ) | const |
Definition at line 397 of file pcbexpr_evaluator.cpp.
References m_typeOverrides, and EDA_ITEM::Type().
Referenced by PCBEXPR_TYPE_REF::GetValue().
|
inline |
Definition at line 104 of file pcbexpr_evaluator.h.
References index, and m_items.
Referenced by PCBEXPR_VAR_REF::GetObject(), isCoupledDiffPairFunc(), searchAreas(), and searchFootprintsNearItem().
|
inline |
Definition at line 105 of file pcbexpr_evaluator.h.
References m_layer.
Referenced by collidesWithArea(), collidesWithCourtyard(), enclosedByAreaFunc(), PCBEXPR_VAR_REF::GetValue(), intersectsAreaFunc(), intersectsBackCourtyardFunc(), intersectsCourtyardFunc(), and intersectsFrontCourtyardFunc().
|
inlineinherited |
Definition at line 447 of file libeval_compiler.h.
References m_errorCallback.
Referenced by collidesWithArea(), enclosedByAreaFunc(), LIBEVAL::UOP::Exec(), existsOnLayerFunc(), getFieldFunc(), hasComponentClassFunc(), hasExactNetclassFunc(), hasNetclassFunc(), inDiffPairFunc(), inNetChainClassFunc(), inNetChainFunc(), intersectsAreaFunc(), intersectsBackCourtyardFunc(), intersectsCourtyardFunc(), intersectsFrontCourtyardFunc(), memberOfFootprintFunc(), memberOfGroupFunc(), memberOfSheetFunc(), and memberOfSheetOrChildrenFunc().
|
inlineprivateinherited |
Definition at line 454 of file libeval_compiler.h.
References m_inlineStorage.
Referenced by AllocValue(), and Reset().
|
inlineinherited |
Definition at line 414 of file libeval_compiler.h.
References _, AllocValue(), m_stack, m_stackPtr, and ReportError().
Referenced by enclosedByAreaFunc(), LIBEVAL::UOP::Exec(), existsOnLayerFunc(), fromToFunc(), LIBEVAL::COMPILER::generateUCode(), getFieldFunc(), hasComponentClassFunc(), hasExactNetclassFunc(), hasNetclassFunc(), inDiffPairFunc(), inNetChainClassFunc(), inNetChainFunc(), intersectsAreaFunc(), intersectsBackCourtyardFunc(), intersectsCourtyardFunc(), intersectsFrontCourtyardFunc(), memberOfFootprintFunc(), memberOfGroupFunc(), memberOfSheetFunc(), memberOfSheetOrChildrenFunc(), and LIBEVAL::UCODE::Run().
|
inlineinherited |
Definition at line 409 of file libeval_compiler.h.
References m_stack, and m_stackPtr.
Referenced by enclosedByAreaFunc(), LIBEVAL::UOP::Exec(), existsOnLayerFunc(), fromToFunc(), LIBEVAL::COMPILER::generateUCode(), getFieldFunc(), hasComponentClassFunc(), hasExactNetclassFunc(), hasNetChainFunc(), hasNetclassFunc(), inDiffPairFunc(), inNetChainClassFunc(), inNetChainFunc(), intersectsAreaFunc(), intersectsBackCourtyardFunc(), intersectsCourtyardFunc(), intersectsFrontCourtyardFunc(), isBlindBuriedViaFunc(), isBlindVia(), isBuriedVia(), isCoupledDiffPairFunc(), isMicroVia(), isPlatedFunc(), memberOfFootprintFunc(), memberOfGroupFunc(), memberOfSheetFunc(), and memberOfSheetOrChildrenFunc().
|
inherited |
Definition at line 700 of file libeval_compiler.cpp.
References m_errorCallback.
Referenced by collidesWithArea(), enclosedByAreaFunc(), LIBEVAL::UOP::Exec(), existsOnLayerFunc(), getFieldFunc(), hasComponentClassFunc(), hasExactNetclassFunc(), hasNetclassFunc(), inDiffPairFunc(), inNetChainClassFunc(), inNetChainFunc(), intersectsAreaFunc(), intersectsBackCourtyardFunc(), intersectsCourtyardFunc(), intersectsFrontCourtyardFunc(), memberOfFootprintFunc(), memberOfGroupFunc(), memberOfSheetFunc(), memberOfSheetOrChildrenFunc(), Pop(), and Top().
|
inlineoverridevirtual |
Rewind for reuse on the next evaluation (see LIBEVAL::CONTEXT::Reset()).
Reimplemented from LIBEVAL::CONTEXT.
Definition at line 87 of file pcbexpr_evaluator.h.
References F_Cu, m_constraint, m_items, m_layer, m_typeOverrides, and LIBEVAL::CONTEXT::Reset().
Referenced by DRC_RULE_CONDITION::EvaluateFor().
|
inline |
Definition at line 83 of file pcbexpr_evaluator.h.
References m_constraint.
Referenced by DRC_RULE_CONDITION::EvaluateFor().
|
inlineinherited |
Definition at line 442 of file libeval_compiler.h.
References m_errorCallback.
Referenced by DRC_RULE_CONDITION::EvaluateFor(), MULTICHANNEL_TOOL::findComponentsInRuleArea(), MULTICHANNEL_TOOL::findOtherItemsInRuleArea(), MULTICHANNEL_TOOL::findRoutingInRuleArea(), LIBEVAL::COMPILER::generateUCode(), and ITEM_EVAL_EXPECTATION::RunTest().
|
inline |
Definition at line 77 of file pcbexpr_evaluator.h.
References m_items.
Referenced by DRC_RULE_CONDITION::EvaluateFor(), MULTICHANNEL_TOOL::findComponentsInRuleArea(), MULTICHANNEL_TOOL::findOtherItemsInRuleArea(), MULTICHANNEL_TOOL::findRoutingInRuleArea(), ITEM_EVAL_EXPECTATION::RunTest(), DIALOG_FIND_BY_PROPERTIES::selectMatchingFromQuery(), testEvalExpr(), and testEvalExpr().
|
inline |
Definition at line 84 of file pcbexpr_evaluator.h.
References m_layer.
Referenced by DRC_RULE_CONDITION::EvaluateFor().
|
inline |
Definition at line 97 of file pcbexpr_evaluator.h.
References m_typeOverrides.
Referenced by DRC_RULE_CONDITION::EvaluateFor().
|
inlineinherited |
Definition at line 437 of file libeval_compiler.h.
References m_stackPtr.
Referenced by LIBEVAL::UCODE::Run().
Definition at line 403 of file libeval_compiler.h.
References m_ownedValues.
Referenced by LIBEVAL::UOP::Exec(), and LIBEVAL::UCODE::Run().
|
inlineinherited |
Peek the top of the stack without popping (used by the short-circuit jumps).
Definition at line 426 of file libeval_compiler.h.
References _, AllocValue(), m_stack, m_stackPtr, and ReportError().
Referenced by LIBEVAL::UOP::Exec().
|
staticconstexprprivateinherited |
Definition at line 452 of file libeval_compiler.h.
Referenced by AllocValue().
|
private |
Definition at line 108 of file pcbexpr_evaluator.h.
Referenced by GetConstraint(), PCBEXPR_CONTEXT(), Reset(), and SetConstraint().
|
privateinherited |
Definition at line 466 of file libeval_compiler.h.
Referenced by HasErrorCallback(), ReportError(), Reset(), and SetErrorCallback().
|
privateinherited |
Definition at line 463 of file libeval_compiler.h.
Referenced by inlineValue().
|
privateinherited |
Definition at line 464 of file libeval_compiler.h.
Referenced by AllocValue(), CONTEXT(), and Reset().
|
private |
Definition at line 109 of file pcbexpr_evaluator.h.
Referenced by GetBoard(), GetItem(), PCBEXPR_CONTEXT(), Reset(), and SetItems().
|
private |
Definition at line 110 of file pcbexpr_evaluator.h.
Referenced by GetLayer(), PCBEXPR_CONTEXT(), Reset(), and SetLayer().
|
privateinherited |
Definition at line 459 of file libeval_compiler.h.
Referenced by AllocValue(), CONTEXT(), Reset(), and StoreValue().
|
privateinherited |
|
privateinherited |
|
private |
Definition at line 111 of file pcbexpr_evaluator.h.
Referenced by GetEffectiveType(), Reset(), and SetTypeOverride().