public void Traversal(CRTreeTraversalDelegate treeNodeTraversal)
        {
            treeNodeTraversal(this);

            for (int i = 0; i < ChildCount; ++i)
            {
                CRTreeNode childNode = Children[i];
                if (childNode != null)
                {
                    childNode.Traversal(treeNodeTraversal);
                }
            }
        }
示例#2
0
    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);
          }
        }
      }
    }
示例#3
0
    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);
            }
          }
        }
      }
    }