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

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

本文简介:选择自 yushang0824 的 blog

var

  node: tyunode;

begin

  if brother = nil then

    if ffirstnode = nil then

    begin

      result := tyunode.create(self);

      ffirstnode := result;

      exit;

    end

    else

      brother := ffirstnode;

 

  node := brother.getlastbrother;

  result := tyunode.create(self);

  node.fdownright := result;

  result.fupright := node;

end;

 

function tyutree.addchild(parent: tyunode): tyunode;

var

  node: tyunode;

begin

  if parent = nil then

  begin

    result := add(nil);

    exit;

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

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

go top