Home > Back-end >  Builds a class in Delphi, want to let the base class and derived class implements the cloning operat
Builds a class in Delphi, want to let the base class and derived class implements the cloning operat

Time:09-20

Is a beginner, the Delphi cloning cannot be cast, because it is a dynamic,

CodePudding user response:

Procedure AssignTo (Dest: TPersistent);
This process is to clone the operation, in the derived class to override this method, operation to replicate data here,
Below is the ADODB parameters of cloning,
Procedure TParameter. AssignTo (Dest: TPersistent);

Procedure AssignToParam (Param: TParam);
The begin
Param. Name:=Name;
Param. ParamType:=TParamType (Direction);
Param. DataType:=DataType;
Param. Size:=the Size;
Param. Precision:=Precision;
Param. NumericScale:=NumericScale;
Param. Value:=Value;
end;

The begin
If Dest is TField then
TField (Dest). The Value: the Value=
Else if Dest is TParam then
The else AssignToParam (TParam (Dest))
Inherited AssignTo (Dest);
end;

CodePudding user response:

Can I add a QQ is QQ992951871 self-study

CodePudding user response:

With the use of class types: what happened?

CodePudding user response:

Who cloned who ah?
  • Related