KiCad PCB EDA Suite
Loading...
Searching...
No Matches
dialog_drc_rule_editor.cpp File Reference

Go to the source code of this file.

Functions

const RULE_TREE_NODEFindNodeById (const std::vector< RULE_TREE_NODE > &aNodes, int aTargetId)
 
bool nodeExists (const RULE_TREE_NODE &aRuleTreeNode, const wxString &aTargetName)
 Checks if a node with the given name exists in the rule tree or its child nodes.
 
bool nodeExists (const std::vector< RULE_TREE_NODE > &aRuleTreeNodes, const wxString &aTargetName)
 Checks if a node with the given name exists in a list of rule tree nodes.
 

Function Documentation

◆ FindNodeById()

const RULE_TREE_NODE * FindNodeById ( const std::vector< RULE_TREE_NODE > & aNodes,
int aTargetId )

Definition at line 52 of file dialog_drc_rule_editor.cpp.

◆ nodeExists() [1/2]

bool nodeExists ( const RULE_TREE_NODE & aRuleTreeNode,
const wxString & aTargetName )

Checks if a node with the given name exists in the rule tree or its child nodes.

Parameters
aRuleTreeNodeThe node to check.
aTargetNameThe name of the target node to search for.
Returns
true if the node exists, false otherwise.

Definition at line 697 of file dialog_drc_rule_editor.cpp.

References RULE_TREE_NODE::m_childNodes, RULE_TREE_NODE::m_nodeName, and nodeExists().

Referenced by DIALOG_DRC_RULE_EDITOR::buildRuleTreeNode(), nodeExists(), and nodeExists().

◆ nodeExists() [2/2]

bool nodeExists ( const std::vector< RULE_TREE_NODE > & aRuleTreeNodes,
const wxString & aTargetName )

Checks if a node with the given name exists in a list of rule tree nodes.

Parameters
aRuleTreeNodesThe list of rule tree nodes to check.
aTargetNameThe name of the target node to search for.
Returns
true if the node exists, false otherwise.

Definition at line 723 of file dialog_drc_rule_editor.cpp.

References nodeExists().