|
KiCad PCB EDA Suite
|
Concrete class representing the base data structure for a rule editor. More...
#include <rule_editor_data_base.h>
Public Member Functions | |
| RULE_EDITOR_DATA_BASE ()=default | |
| RULE_EDITOR_DATA_BASE (int aId, int aParentId, wxString aRuleName) | |
| virtual | ~RULE_EDITOR_DATA_BASE ()=default |
| 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. | |
| void | CopyFrom (const ICopyable &aSource) override |
Implementation of the polymorphic CopyFrom method. | |
Private Attributes | |
| 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). | |
Concrete class representing the base data structure for a rule editor.
Definition at line 45 of file rule_editor_data_base.h.
|
default |
Referenced by CopyFrom(), and DRC_RE_BASE_CONSTRAINT_DATA::DRC_RE_BASE_CONSTRAINT_DATA().
|
inlineexplicit |
Definition at line 50 of file rule_editor_data_base.h.
References m_id, m_isNew, m_parentId, and m_ruleName.
|
virtualdefault |
|
inlineoverridevirtual |
Implementation of the polymorphic CopyFrom method.
| source | The source object to copy from. |
Implements ICopyable.
Definition at line 132 of file rule_editor_data_base.h.
References m_comment, and RULE_EDITOR_DATA_BASE().
Referenced by DRC_RE_BASE_CONSTRAINT_DATA::CopyFrom(), and DIALOG_DRC_RULE_EDITOR::DuplicateRule().
|
inline |
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().
|
inline |
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().
|
inline |
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().
|
inline |
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().
|
inline |
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().
|
inline |
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.
|
inline |
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().
|
inline |
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().
|
inline |
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().
|
inline |
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.
|
private |
Definition at line 143 of file rule_editor_data_base.h.
Referenced by CopyFrom(), GetComment(), and SetComment().
|
private |
Definition at line 140 of file rule_editor_data_base.h.
Referenced by GetId(), RULE_EDITOR_DATA_BASE(), and SetId().
|
private |
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().
|
private |
Definition at line 141 of file rule_editor_data_base.h.
Referenced by GetParentId(), RULE_EDITOR_DATA_BASE(), and SetParentId().
|
private |
Definition at line 142 of file rule_editor_data_base.h.
Referenced by GetRuleName(), RULE_EDITOR_DATA_BASE(), and SetRuleName().