📄 testinterfaces.out
字号:
unit TestInterfaces;
{ AFS 16 Jan 2000
This unit compiles but is not semantically meaningfull
it is test cases for the code formatting utility
This unit tests interface declarations.
This was orignally extacted from TestTypeDefs
but this version is a bit more mixed up
}
interface
uses Classes;
type
{ some fairly simple real-world code (modified slightly and deformated a bit) }
IMyIterator = interface(IUnknown)
procedure First; safecall;
procedure Next; safecall;
end;
IEntryJournalLookupDisp = dispinterface
['{D34D4103-FBC4-11D2-94F3-00A0CC39B56F}']
property StartDate: TDateTime dispid 1;
property EndDate: TDateTime dispid 2;
property MaxRows: integer dispid 2000;
property Iterator: IMyIterator ReadOnly dispid 2001;
function Execute: IMyIterator; dispid 2002;
function GetNewOjectKey: IUnknown; dispid 2003;
property Soy: integer writeonly;
end;
IEntryJournalIterator = interface(IMyIterator)
['{D34D4105-FBC4-11D2-94F3-00A0CC39B56F}']
function Get_Note: WideString; safecall;
function Get_Status: WideString; safecall;
function Get_CreatedDate: TDateTime; safecall;
function Get_LoginName: WideString; safecall;
function Get_Id: integer; safecall;
procedure Set_Id(Id: integer); safecall;
property Note: WideString Read Get_Note;
property Status: WideString Read Get_Status;
property CreatedDate: TDateTime Read Get_CreatedDate;
property LoginName: WideString Read Get_LoginName;
property Id: integer Read Get_Id Write Set_Id;
end;
IMyOtherIterator = interface(IUnknown)
procedure First; safecall;
procedure Next; safecall;
end;
const
FOO_DISP_ID = 12;
BAR_DISP_ID = 1002;
type
IFooDisp = dispinterface
['{3050F1FF-98B5-11CF-BB82-00AA00CACE0B}']
procedure setAttribute(const strAttributeName: WideString;
AttributeValue: olevariant; lFlags: integer); dispid -2147417611;
function getAttribute(const strAttributeName: WideString;
lFlags: integer): olevariant; dispid FOO_DISP_ID;
function removeAttribute(const strAttributeName: WideString;
lFlags: integer): wordbool; dispid -2147417609;
property ClassName: WideString dispid BAR_DISP_ID + FOO_DISP_ID;
property id: WideString dispid (-1 * FOO_DISP_ID);
property onfilterchange: olevariant dispid -2147412069;
property children: IDispatch ReadOnly dispid -2147417075;
property all: IDispatch ReadOnly dispid -2147417074;
property foo[const bar: integer]: IDispatch ReadOnly dispid -2147417073;
property foo2[var bar: integer]: IDispatch ReadOnly dispid -2147417072;
property foo3[out bar: integer]: IDispatch ReadOnly dispid -2147417071;
end;
implementation
end.
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -