/// <summary>
 /// �h���N���X�p�B
 /// </summary>
 /// <param name="__text"></param>
 protected AbstractFileNode(string __text)
 {
     this.text_ = __text;
     this.root_ = this;
     this.parent_ = null;
     this.depth_ = 0;
 }
        /*
         * �[�x��`�F�b�N���܂��B
         */
        private static void depth_check(AbstractFileNode __current)
        {
            if ( __current.is_composite ) {
                Folder c = (Folder)__current;

                if ( !c.is_nodeEmpty ) {

                    foreach ( AbstractFileNode it in c.nodes ) {
                        it.depth_ = __current.depth_ + 1;
                        it.root_ = __current.root_;

                        if ( it.is_composite ) {
                            depth_check( it );
                        }

                    }
                    //Algorithms.each<Tree>(
                    //    c.nodes,
                    //    delegate(Tree node) {
                    //        node.depth_ = __current.depth + 1;
                    //        node.root_ = __current.root_;
                    //        if ( node.is_composite ) {
                    //            depth_check(node);
                    //        }
                    //    }
                    //);
                }

            }
        }
 /**
  * Composite �� append ���ꂽ�Ƃ��ɌĂ΂�܂��B
  */
 protected void setParent(AbstractFileNode __child)
 {
     __child.parent_ = this;
     if ( this.parent == null ) {
         __child.root_ = this;
     } else {
         __child.root_ = this.parent_;
     }
     depth_check( this );
 }