1 2 3 4 5 下一页
=======类的代码=========
{***********************}
{ }
{ CodeMachine }
{ }
{ 版权所有 (C) 2004 nil }
{ }
{ 2004-6-10 }
{ }
{************************}
{
通常将TTracer的实例存放于application级的Session中,在使用时,
创建一个ITraceInfo,调用TTracer.Write(ITraceInfo)即可,
}
unit com.sunset.app.tracer;
interface
uses StrUtils,classes,SysUtils;
type
//==========================
// 接口声明
//==========================
//跟踪信息的接口
ITraceInfo = interface
function ToString: string;
end;
//输出目标的接口
IOutput = interface
procedure Write(const aInfo: ITraceInfo); //写入跟踪信息
end;
//==========================
// 跟踪信息类 ,实现 ITraceInfo
//==========================
//string形式的跟踪记录
TStringTI = class(TInterfacedObject, ITraceInfo)
private
FData: string;
public
constructor Create(data: string);
function ToString: string;
end;
//==========================
// 跟踪信息输出类,实现 IOutput
//==========================
上一篇: Delphi设计简易对象垃圾回收框架
下一篇: Delphi开发Web应用程序打印组件
1 2 3 4 5 下一页
文章整理:西部数码--专业提供域名注册、虚拟主机服务
http://www.west263.com
以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!



