表结构类的设计思路
都先生 2012-02-22 09:34:01 我想构建一个类似表的类,该类能够记录字段名称、字段类型、字段值,在表中的纵坐标值、横坐标值
我定如下
TExcelField = class;
TExcelFields = class;
TExcelTable = class
private
public
FFieldCount :Integer;
FRecordCount :Integer;
FExcelFieldList : array[1..RECCOUNT] of TExcelFields;
end;
TExcelField=class(TObject)
private
function GetCFName:string;
function GetFName:string;
function GetFType:string;
function GetValue:string;
public
FCFName: string; //字段中文名称
FFName: string; //字段名称
FFType: string; //字段类型
FValue: string; //字段值
constructor Create(); reintroduce;
destructor Destroy; reintroduce;
property CFName:string read GetCFName;
property FName:string read GetFName;
property FType:string read GetFType;
property Value:string read GetValue;
end;
TExcelFields=class(TObject)
private
public
FExlField: array[1..MAXCOUNT] of TExcelField; //字段序列
end;
有什么不好的地方吗?