Beispiel Wrapper, sowas ist nich aufwendig:
Delphi-Quellcode:
type
TMyObject= class(TObject)
public
function A: Integer;
procedure B;
constructor Create;
end;
TMyWrapper = class(TObject)
private
FMyObject: TMyObject;
function A: Integer;
public
procedure B;
constructor Create;
destructor Destroy; override;
end;
implementation
[...]
function TMyWrapper.A: Integer;
begin
Result:= FMyObject.A;
end;
procedure TMyWrapper.B;
begin
FMyObject.B;
end;
constructor TMyWrapper.Create;
begin
inherited Create;
FMyObject:= TMyObject.Create;
end;
destructor TMyWrapper.Destroy;
begin
FMyObject.Free;
end;
Sollte das Prinzip klarmachen...