Exemplo n.º 1
0
 public TreeItem( Tree rootParam, ulong keyParam, object value )
 {
     root = rootParam;
     key  = keyParam;
     left  = null;
     right = null;
     data  = value;
     refCount = 0;
 }
Exemplo n.º 2
0
        /***************************************************************************
         * Function: MakeCTree
         * Purpose:
         * Build a ctree from the lines in the section given
         * Remember that we are only interested in the lines that are
         * not already linked.
         * The value we store in the tree is the handle of the line. the key
         * is the line hash code  */
        public Tree MakeCTree(bool isIgnoreBlanks)
        {
            Tree tree = new Tree();	/* make an empty tree */

            for( Line line = first; line != null; line = (Line)line.GetNext() ) {
                if( line.link == null) {
                    tree.update( line.GetHashcode(isIgnoreBlanks), line );
                }
                if( line == last ) break;
            }
            return tree;
        }