设计模式、用Delphi实现---->Decorator 模式[13]

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

本文简介:选择自 programlover 的 blog

»   重要的是我们没必要关心是装饰ttextfile ,还是tlineprinter }

» if converttouppercase then

»   result := tuppercasefilter.create(result, true);

end;

 

procedure tclient.listcontents;

var

  t: ttextstream;

begin

  t := createoutput;

  { 在这里,我们并不知道是否使用了装饰}

  try

    {t写内容 }

    t.writeline('contents');

  finally

    t.free;

  end;

end;

本文关键:设计模式、Delphi、VCL库
 

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

go top