public void Traversal(CRTreeTraversalDelegate treeNodeTraversal) { treeNodeTraversal(this); for (int i = 0; i < ChildCount; ++i) { CRTreeNode childNode = Children[i]; if (childNode != null) { childNode.Traversal(treeNodeTraversal); } } }
public void Traversal(CRTreeTraversalDelegate treeNodeTraversal, CRTreeAddConditionDelegate treeNodeAddCondition) { if (treeNodeAddCondition(this)) { treeNodeTraversal(this); for (int i = 0; i < ChildCount; ++i) { CRTreeNode childNode = Children[i]; if (childNode != null) { childNode.Traversal(treeNodeTraversal, treeNodeAddCondition); } } } }
public void Traversal(CRTreeTraversalIndentationDelegate treeNodeTraversal, CRTreeAddConditionDelegate treeNodeAddCondition, CRTreeDescendConditionDelegate treeNodeDescendCondition, int indentation) { if (treeNodeAddCondition(this)) { treeNodeTraversal(this, indentation); if (treeNodeDescendCondition(this)) { for (int i = 0; i < ChildCount; ++i) { CRTreeNode childNode = Children[i]; if (childNode != null) { childNode.Traversal(treeNodeTraversal, treeNodeAddCondition, treeNodeDescendCondition, indentation + 1); } } } } }