testinterfaceimplements.out

来自「格式化源码的最新板」· OUT 代码 · 共 43 行

OUT
43
字号
unit testinterfaceimplements;

interface

type
  imyinterface = interface
    procedure p1;
    procedure p2;
  end;

  tmyclass = class(TObject, IMyInterface)
    fmyinterface: imyinterface;
    property myinterface: imyinterface Read fmyinterface implements imyinterface;
  end;

  tmyimplclass = class
    procedure p1;
    procedure p2;
  end;

  tmyclass2 = class(TInterfacedObject, IMyInterface)
    fmyimplclass: tmyimplclass;
    property myimplclass: tmyimplclass Read fmyimplclass implements imyinterface;
    procedure imyinterface.p1 = myp1;
    procedure myp1;
  end;

implementation

procedure tmyclass2.myp1;
begin
end;

procedure tmyimplclass.p1;
begin
end;

procedure tmyimplclass.p2;
begin
end;

end.
 

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?