KiCad PCB EDA Suite
|
#include <drc_rule_condition.h>
Public Member Functions | |
DRC_RULE_CONDITION (const wxString &aExpression="") | |
~DRC_RULE_CONDITION () | |
bool | EvaluateFor (const BOARD_ITEM *aItemA, const BOARD_ITEM *aItemB, int aConstraint, PCB_LAYER_ID aLayer, REPORTER *aReporter=nullptr) |
bool | Compile (REPORTER *aReporter, int aSourceLine=0, int aSourceOffset=0) |
void | SetExpression (const wxString &aExpression) |
wxString | GetExpression () const |
Private Attributes | |
wxString | m_expression |
std::unique_ptr< PCBEXPR_UCODE > | m_ucode |
Definition at line 35 of file drc_rule_condition.h.
DRC_RULE_CONDITION::DRC_RULE_CONDITION | ( | const wxString & | aExpression = "" | ) |
Definition at line 31 of file drc_rule_condition.cpp.
DRC_RULE_CONDITION::~DRC_RULE_CONDITION | ( | ) |
Definition at line 38 of file drc_rule_condition.cpp.
bool DRC_RULE_CONDITION::Compile | ( | REPORTER * | aReporter, |
int | aSourceLine = 0 , |
||
int | aSourceOffset = 0 |
||
) |
Definition at line 89 of file drc_rule_condition.cpp.
References _, LIBEVAL::COMPILER::Compile(), F_Cu, GetExpression(), m_ucode, REPORTER::Report(), RPT_SEVERITY_ERROR, and LIBEVAL::COMPILER::SetErrorCallback().
Referenced by DRC_ENGINE::compileRules(), and DRC_RULES_PARSER::parseConstraint().
bool DRC_RULE_CONDITION::EvaluateFor | ( | const BOARD_ITEM * | aItemA, |
const BOARD_ITEM * | aItemB, | ||
int | aConstraint, | ||
PCB_LAYER_ID | aLayer, | ||
REPORTER * | aReporter = nullptr |
||
) |
Definition at line 43 of file drc_rule_condition.cpp.
References _, GetExpression(), m_ucode, REPORTER::Report(), LIBEVAL::CONTEXT::SetErrorCallback(), and PCBEXPR_CONTEXT::SetItems().
|
inline |
Definition at line 47 of file drc_rule_condition.h.
References m_expression.
Referenced by Compile(), and EvaluateFor().
|
inline |
Definition at line 46 of file drc_rule_condition.h.
References m_expression.
|
private |
Definition at line 50 of file drc_rule_condition.h.
Referenced by GetExpression(), and SetExpression().
|
private |
Definition at line 51 of file drc_rule_condition.h.
Referenced by Compile(), and EvaluateFor().