|
KiCad PCB EDA Suite
|
#include <drc_re_bool_input_constraint_data.h>
Public Member Functions | |
| DRC_RE_BOOL_INPUT_CONSTRAINT_DATA ()=default | |
| DRC_RE_BOOL_INPUT_CONSTRAINT_DATA (const DRC_RE_BASE_CONSTRAINT_DATA &aBaseData) | |
| DRC_RE_BOOL_INPUT_CONSTRAINT_DATA (int aId, int aParentId, bool aBoolInputValue, wxString aRuleName) | |
| virtual | ~DRC_RE_BOOL_INPUT_CONSTRAINT_DATA ()=default |
| VALIDATION_RESULT | Validate () const override |
| Validates the constraint data. | |
| wxString | GenerateRule (const RULE_GENERATION_CONTEXT &aContext) override |
| bool | GetBoolInputValue () |
| void | SetBoolInputValue (bool aBoolInputValue) |
| void | CopyFrom (const ICopyable &aSource) override |
| std::vector< PCB_LAYER_ID > | GetLayers () |
| void | SetLayers (std::vector< PCB_LAYER_ID > aLayers) |
| wxString | GetRuleCondition () |
| void | SetRuleCondition (wxString aRuleCondition) |
| wxString | GetConstraintCode () |
| void | SetConstraintCode (wxString aCode) |
| wxString | GetGeneratedRule () const |
| void | SetGeneratedRule (const wxString &aRule) |
| wxString | GetOriginalRuleText () const |
| void | SetOriginalRuleText (const wxString &aText) |
| bool | WasEdited () const |
| void | SetWasEdited (bool aEdited) |
| int | GetId () |
| Get the unique ID of the rule. | |
| void | SetId (int aId) |
| Set the unique ID of the rule. | |
| int | GetParentId () |
| Get the parent ID of the rule. | |
| void | SetParentId (int aParentId) |
| Set the parent ID of the rule. | |
| wxString | GetRuleName () |
| Get the name of the rule. | |
| void | SetRuleName (wxString aRuleName) |
| Set the name of the rule. | |
| wxString | GetComment () |
| Get the comment associated with the rule. | |
| void | SetComment (wxString aComment) |
| Set the comment for the rule. | |
| bool | IsNew () |
| Check if the rule is marked as new. | |
| void | SetIsNew (bool aIsNew) |
| Mark the rule as new or not. | |
Protected Member Functions | |
| wxString | buildRule (const RULE_GENERATION_CONTEXT &aContext, const std::vector< wxString > &aConstraintClauses) const |
Static Protected Member Functions | |
| static wxString | sanitizeRuleName (const wxString &aRuleName) |
| static wxString | quoteString (const wxString &aCondition) |
| static wxString | trimTrailingZeros (const wxString &aValue) |
| static wxString | formatDouble (double aValue, int aPrecision=6) |
Private Attributes | |
| bool | m_boolInputValue { false } |
| std::vector< PCB_LAYER_ID > | m_layers |
| wxString | m_ruleCondition |
| wxString | m_constraintCode |
| wxString | m_generatedRule |
| wxString | m_originalRuleText |
| bool | m_wasEdited = false |
| int | m_id |
| std::optional< int > | m_parentId |
| wxString | m_ruleName |
| wxString | m_comment |
| bool | m_isNew |
| Flag indicating if the user is creating a new rule (true) or editing an existing rule (false). | |
Definition at line 30 of file drc_re_bool_input_constraint_data.h.
|
default |
Referenced by CopyFrom().
|
inlineexplicit |
Definition at line 35 of file drc_re_bool_input_constraint_data.h.
References DRC_RE_BASE_CONSTRAINT_DATA::DRC_RE_BASE_CONSTRAINT_DATA().
|
inlineexplicit |
Definition at line 40 of file drc_re_bool_input_constraint_data.h.
References DRC_RE_BASE_CONSTRAINT_DATA::DRC_RE_BASE_CONSTRAINT_DATA(), and m_boolInputValue.
|
virtualdefault |
|
inlineprotectedinherited |
Definition at line 151 of file drc_re_base_constraint_data.h.
References RULE_GENERATION_CONTEXT::comment, RULE_GENERATION_CONTEXT::conditionExpression, RULE_GENERATION_CONTEXT::layerClause, quoteString(), RULE_GENERATION_CONTEXT::ruleName, and sanitizeRuleName().
Referenced by DRC_RE_ABSOLUTE_LENGTH_TWO_CONSTRAINT_DATA::GenerateRule(), DRC_RE_BOOL_INPUT_CONSTRAINT_DATA::GenerateRule(), DRC_RE_NUMERIC_INPUT_CONSTRAINT_DATA::GenerateRule(), DRC_RE_ROUTING_DIFF_PAIR_CONSTRAINT_DATA::GenerateRule(), DRC_RE_ROUTING_WIDTH_CONSTRAINT_DATA::GenerateRule(), and DRC_RE_VIA_STYLE_CONSTRAINT_DATA::GenerateRule().
|
inlineoverridevirtual |
Reimplemented from DRC_RE_BASE_CONSTRAINT_DATA.
Definition at line 68 of file drc_re_bool_input_constraint_data.h.
References DRC_RE_BASE_CONSTRAINT_DATA::CopyFrom(), DRC_RE_BOOL_INPUT_CONSTRAINT_DATA(), and m_boolInputValue.
|
inlinestaticprotectedinherited |
Definition at line 145 of file drc_re_base_constraint_data.h.
References trimTrailingZeros().
Referenced by DRC_RE_ABSOLUTE_LENGTH_TWO_CONSTRAINT_DATA::GenerateRule(), DRC_RE_NUMERIC_INPUT_CONSTRAINT_DATA::GenerateRule(), DRC_RE_ROUTING_DIFF_PAIR_CONSTRAINT_DATA::GenerateRule(), DRC_RE_ROUTING_WIDTH_CONSTRAINT_DATA::GenerateRule(), and DRC_RE_VIA_STYLE_CONSTRAINT_DATA::GenerateRule().
|
inlineoverridevirtual |
Reimplemented from DRC_RE_BASE_CONSTRAINT_DATA.
Definition at line 55 of file drc_re_bool_input_constraint_data.h.
References DRC_RE_BASE_CONSTRAINT_DATA::buildRule(), DRC_RE_BASE_CONSTRAINT_DATA::GetConstraintCode(), and m_boolInputValue.
|
inline |
Definition at line 64 of file drc_re_bool_input_constraint_data.h.
References m_boolInputValue.
|
inlineinherited |
Get the comment associated with the rule.
Definition at line 104 of file rule_editor_data_base.h.
References m_comment.
Referenced by DRC_RULE_SAVER::generateRuleText().
|
inlineinherited |
Definition at line 63 of file drc_re_base_constraint_data.h.
References m_constraintCode.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), DRC_RE_ABSOLUTE_LENGTH_TWO_CONSTRAINT_DATA::GenerateRule(), DRC_RE_BOOL_INPUT_CONSTRAINT_DATA::GenerateRule(), DRC_RE_NUMERIC_INPUT_CONSTRAINT_DATA::GenerateRule(), DRC_RE_ROUTING_WIDTH_CONSTRAINT_DATA::GenerateRule(), and DRC_RULE_SAVER::generateRuleText().
|
inlineinherited |
Definition at line 67 of file drc_re_base_constraint_data.h.
References m_generatedRule.
|
inlineinherited |
Get the unique ID of the rule.
Definition at line 62 of file rule_editor_data_base.h.
References m_id.
Referenced by DIALOG_DRC_RULE_EDITOR::buildRuleTreeNode(), and DIALOG_DRC_RULE_EDITOR::LoadExistingRules().
|
inlineinherited |
Definition at line 55 of file drc_re_base_constraint_data.h.
References m_layers.
|
inlineinherited |
Definition at line 71 of file drc_re_base_constraint_data.h.
References m_originalRuleText.
|
inlineinherited |
Get the parent ID of the rule.
Definition at line 76 of file rule_editor_data_base.h.
References m_parentId.
Referenced by RULE_EDITOR_DIALOG_BASE::AppendNewRuleTreeItem().
|
inlineinherited |
Definition at line 59 of file drc_re_base_constraint_data.h.
References m_ruleCondition.
Referenced by BOOST_AUTO_TEST_CASE(), and BOOST_AUTO_TEST_CASE().
|
inlineinherited |
Get the name of the rule.
Definition at line 90 of file rule_editor_data_base.h.
References m_ruleName.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and DIALOG_DRC_RULE_EDITOR::UpdateRuleTypeTreeItemData().
|
inlineinherited |
Check if the rule is marked as new.
Definition at line 118 of file rule_editor_data_base.h.
References m_isNew.
Referenced by DIALOG_DRC_RULE_EDITOR::RemoveRule().
|
inlinestaticprotectedinherited |
Definition at line 124 of file drc_re_base_constraint_data.h.
References CTX_QUOTED_STR, and EscapeString().
Referenced by buildRule().
|
inlinestaticprotectedinherited |
Definition at line 93 of file drc_re_base_constraint_data.h.
References result.
Referenced by buildRule().
|
inline |
Definition at line 66 of file drc_re_bool_input_constraint_data.h.
References m_boolInputValue.
|
inlineinherited |
Set the comment for the rule.
| aComment | The comment to set. |
Definition at line 111 of file rule_editor_data_base.h.
References m_comment.
|
inlineinherited |
Definition at line 65 of file drc_re_base_constraint_data.h.
References m_constraintCode.
Referenced by BOOST_AUTO_TEST_CASE(), BOOST_AUTO_TEST_CASE(), and DRC_RULE_EDITOR_UTILS::ConstraintFromKicadDrc().
|
inlineinherited |
Definition at line 69 of file drc_re_base_constraint_data.h.
References m_generatedRule.
|
inlineinherited |
Set the unique ID of the rule.
| aId | The unique ID to set. |
Definition at line 69 of file rule_editor_data_base.h.
References m_id.
Referenced by DIALOG_DRC_RULE_EDITOR::buildRuleTreeNodeData().
|
inlineinherited |
Mark the rule as new or not.
| aIsNew | True to mark the rule as new, false to mark it as existing. |
Definition at line 125 of file rule_editor_data_base.h.
References m_isNew.
Referenced by DIALOG_DRC_RULE_EDITOR::buildRuleTreeNode(), and DIALOG_DRC_RULE_EDITOR::UpdateRuleTypeTreeItemData().
|
inlineinherited |
Definition at line 57 of file drc_re_base_constraint_data.h.
References m_layers.
|
inlineinherited |
Definition at line 73 of file drc_re_base_constraint_data.h.
References m_originalRuleText.
|
inlineinherited |
Set the parent ID of the rule.
| aParentId | The parent ID to set. |
Definition at line 83 of file rule_editor_data_base.h.
References m_parentId.
Referenced by DIALOG_DRC_RULE_EDITOR::buildRuleTreeNodeData().
|
inlineinherited |
Definition at line 61 of file drc_re_base_constraint_data.h.
References m_ruleCondition.
Referenced by BOOST_AUTO_TEST_CASE(), and BOOST_AUTO_TEST_CASE().
|
inlineinherited |
Set the name of the rule.
| aRuleName | The name of the rule to set. |
Definition at line 97 of file rule_editor_data_base.h.
References m_ruleName.
|
inlineinherited |
Definition at line 77 of file drc_re_base_constraint_data.h.
References m_wasEdited.
|
inlinestaticprotectedinherited |
Definition at line 129 of file drc_re_base_constraint_data.h.
References result.
Referenced by formatDouble().
|
inlineoverridevirtual |
Validates the constraint data.
Override in derived classes to add constraint-specific validation.
Reimplemented from DRC_RE_BASE_CONSTRAINT_DATA.
Definition at line 49 of file drc_re_bool_input_constraint_data.h.
Referenced by BOOST_AUTO_TEST_CASE().
|
inlineinherited |
Definition at line 75 of file drc_re_base_constraint_data.h.
References m_wasEdited.
|
private |
Definition at line 78 of file drc_re_bool_input_constraint_data.h.
Referenced by CopyFrom(), DRC_RE_BOOL_INPUT_CONSTRAINT_DATA(), GenerateRule(), GetBoolInputValue(), and SetBoolInputValue().
|
privateinherited |
Definition at line 143 of file rule_editor_data_base.h.
Referenced by CopyFrom(), GetComment(), and SetComment().
|
privateinherited |
Definition at line 192 of file drc_re_base_constraint_data.h.
Referenced by CopyFrom(), GetConstraintCode(), and SetConstraintCode().
|
privateinherited |
Definition at line 193 of file drc_re_base_constraint_data.h.
Referenced by CopyFrom(), GetGeneratedRule(), and SetGeneratedRule().
|
privateinherited |
Definition at line 140 of file rule_editor_data_base.h.
Referenced by GetId(), RULE_EDITOR_DATA_BASE(), and SetId().
|
privateinherited |
Flag indicating if the user is creating a new rule (true) or editing an existing rule (false).
Definition at line 144 of file rule_editor_data_base.h.
Referenced by IsNew(), RULE_EDITOR_DATA_BASE(), and SetIsNew().
|
privateinherited |
Definition at line 190 of file drc_re_base_constraint_data.h.
Referenced by CopyFrom(), GetLayers(), and SetLayers().
|
privateinherited |
Definition at line 194 of file drc_re_base_constraint_data.h.
Referenced by CopyFrom(), GetOriginalRuleText(), and SetOriginalRuleText().
|
privateinherited |
Definition at line 141 of file rule_editor_data_base.h.
Referenced by GetParentId(), RULE_EDITOR_DATA_BASE(), and SetParentId().
|
privateinherited |
Definition at line 191 of file drc_re_base_constraint_data.h.
Referenced by GetRuleCondition(), and SetRuleCondition().
|
privateinherited |
Definition at line 142 of file rule_editor_data_base.h.
Referenced by GetRuleName(), RULE_EDITOR_DATA_BASE(), and SetRuleName().
|
privateinherited |
Definition at line 195 of file drc_re_base_constraint_data.h.
Referenced by CopyFrom(), SetWasEdited(), and WasEdited().