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

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

本文简介:选择自 programlover 的 blog

·      textstreamownsstream装饰类的构造器的两个参数。

·      实现装饰类重载了readlinewritelinegetendoftext三个方法。并加入了实现。

下面是它的实现部分代码:

 

constructor ttextfilter.create(atextstream: ttextstream; aownsstream: boolean);

begin

  inherited create;

  textstream := atextstream;

  ownsstream := aownsstream;

end;

 

destructor ttextfilter.destroy;

begin

  textstream := nil;

  inherited destroy;

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

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

go top