the definition of Delphi interface interface
2011-04-20 14:54:11| Category: Delphi| Report | Font size Subscription
Type
InterfaceName = Interface (ancestorinterface)
[' {GUID} ']
Memberlist
End
Here, the Ancestorinterface and GUIDs are optional. In most respects, interface declarations are similar to class declarations, with the following limitations:
1.memberList can contain only methods and properties, and cannot contain data members (field).
2. Because the interface has no data members, the read and write qualifiers for the properties in the interface must be methods.
3. All members of the interface are public and are not allowed to use the visibility qualifier.
4. Interfaces do not have constructors or destructors, they cannot be instantiated directly unless they are using classes that implement their methods.
5. The method cannot be declared as virtual, dynamic, abstract, or override. Because the interfaces do not implement their methods, these declarations have no meaning.
Tip: In the IDE of Delphi, press the CTRL+SHIFT+G key to generate a new GUID for an interface.
Delphi Interface Definition