Lines Matching refs:tree
36 /** Return a node stream from a doubly-linked tree whose nodes
39 * Emit navigation nodes (DOWN, UP, and EOF) to let show tree structure.
44 protected object tree;
57 public TreeIterator(object tree)
58 : this(new CommonTreeAdaptor(), tree) {
61 public TreeIterator(ITreeAdaptor adaptor, object tree) {
63 this.tree = tree;
64 this.root = tree;
93 if (adaptor.GetChildCount(tree) == 0) {
94 // single node tree (special)
97 Current = tree;
104 if (tree == null) {
108 if (adaptor.GetChildCount(tree) > 0) {
109 tree = adaptor.GetChild(tree, 0);
110 nodes.Enqueue(tree); // real node is next after DOWN
113 // if no children, look for next sibling of tree or ancestor
114 object parent = adaptor.GetParent(tree);
117 adaptor.GetChildIndex(tree) + 1 >= adaptor.GetChildCount(parent)) {
119 tree = parent;
120 parent = adaptor.GetParent(tree);
125 tree = null; // back at root? nothing left then
131 int nextSiblingIndex = adaptor.GetChildIndex(tree) + 1;
132 tree = adaptor.GetChild(parent, nextSiblingIndex);
133 nodes.Enqueue(tree); // add to queue, might have UP nodes in there
146 tree = root;