Example #1
0
 internal void SetRootLink(DTreeRoot <T> root)
 {
     if (mRoot != root) // assume sub trees are consistent
     {
         mRoot = root;
         if (HasChildren)
         {
             foreach (DTreeNode <T> n in Nodes)
             {
                 n.SetRootLink(root);
             }
         }
     }
 }
Example #2
0
 /// <summary>
 /// creates a new root node, and sets Value to value.
 /// </summary>
 /// <param name="value"></param>
 public DTreeNode(T value)
 {
     mValue = value;
     mRoot  = new DTreeRoot <T>(this);
 }
Example #3
0
 public DTreeNode()
 {
     mValue = default(T);
     mRoot  = new DTreeRoot <T>(this);
 }