自己编写树(Tree)的封装类[12]

[入库:2005年8月18日] [更新:2007年3月25日]

本文简介:选择自 yushang0824 的 blog

    function getlastchild(): tyunode;

 

    function getnext: tyunode;

    function getprev: tyunode;

    function getfirstbrother(): tyunode;

    function getlastbrother(): tyunode;

 

    procedure moveto(destination: tyunode; mode: tyunodeattachmode);

    procedure delete();   

 

    property level: integer read getlevel;

    property parent: tyunode read getparent;

 

    destructor destroy();override;

  end;

 

  tyutree = class(tobject)

  private

    ffirstnode: tyunode;

  public

    function add(brother: tyunode):tyunode;

    function addfirst(brother: tyunode):tyunode;

    function addchild(parent: tyunode):tyunode;

    function addchildfirst(parent: tyunode):tyunode;

    function insert(brother: tyunode):tyunode;

本文关键:自己编写树(Tree)的封装类
  相关方案
Google
 

本站最佳浏览方式为 分辨率 1024x768 IE 6.0(或更高版本的 IE浏览器)

go top