如何前导声明一个class?和其他?
{ Forward class declarations }
type
TPart = class ; //-->如此声明为何不行?????
type
PTPart = ^TPart;
type
TPart = class
private
fstrName:string;
fChildList:TList;
protected
public
constructor Create(strName:string = '');
destructor Destroy; virtual;
property Name:string read fstrName;//全部名称:编号+设备类别
//子设备管理
procedure Add(NewPart:^TPart{??????只能用type定义的东西>});virtual;
procedure Remove(NewPart:^TPart);virtual;
//function Iterator<Equipment*>* CreateList();virtual;
end;
//这里是我设计的一个composite的其中的基类
欢迎大家一起讨论设计模式
QQ:5165504