LucieLastic
Programmer
I've never used the following type of declaration and don't understand how and when you would use it.
eg:
TConversion = class(TObject)
public
function ConvertReadStream(Stream: TStream; Buffer: PChar; BufSize: Integer): Integer; virtual;
function ConvertWriteStream(Stream: TStream; Buffer: PChar; BufSize: Integer): Integer; virtual;
end;
[red] TConversionClass = class of TConversion;[/red] //don't understand
PConversionFormat = ^TConversionFormat;
TConversionFormat = record
ConversionClass: TConversionClass;
Extension: string;
Next: PConversionFormat;
end;
My question is why isn't ConversionClass (in TConversionFormat) not declared as TConversion rather than TConversionClass?
lou
eg:
TConversion = class(TObject)
public
function ConvertReadStream(Stream: TStream; Buffer: PChar; BufSize: Integer): Integer; virtual;
function ConvertWriteStream(Stream: TStream; Buffer: PChar; BufSize: Integer): Integer; virtual;
end;
[red] TConversionClass = class of TConversion;[/red] //don't understand
PConversionFormat = ^TConversionFormat;
TConversionFormat = record
ConversionClass: TConversionClass;
Extension: string;
Next: PConversionFormat;
end;
My question is why isn't ConversionClass (in TConversionFormat) not declared as TConversion rather than TConversionClass?
lou