Lines Matching refs:tree
37 /** Return a node stream from a doubly-linked tree whose nodes
40 * Emit navigation nodes (DOWN, UP, and EOF) to let show tree structure.
46 protected object tree;
60 public TreeIterator( CommonTree tree )
61 : this( new CommonTreeAdaptor(), tree )
65 public TreeIterator( ITreeAdaptor adaptor, object tree )
68 this.tree = tree;
69 this.root = tree;
102 if ( adaptor.GetChildCount( tree ) == 0 )
104 // single node tree (special)
107 Current = tree;
119 if ( tree == null )
126 if ( adaptor.GetChildCount( tree ) > 0 )
128 tree = adaptor.GetChild( tree, 0 );
129 nodes.Enqueue( tree ); // real node is next after DOWN
134 // if no children, look for next sibling of tree or ancestor
135 object parent = adaptor.GetParent( tree );
138 adaptor.GetChildIndex( tree ) + 1 >= adaptor.GetChildCount( parent ) )
141 tree = parent;
142 parent = adaptor.GetParent( tree );
148 tree = null; // back at root? nothing left then
156 int nextSiblingIndex = adaptor.GetChildIndex( tree ) + 1;
157 tree = adaptor.GetChild( parent, nextSiblingIndex );
158 nodes.Enqueue( tree ); // add to queue, might have UP nodes in there
174 tree = root;