6
votes
Vote UpVote

Interfaces without objects

The Programming Works – Delphi interfaces are usually implemented by objects, but that is not necessary. Like you can implement a COM interface in pure C, you can implement a Delphi interface (which follows COM specifications in general) in pure Pascal without using objects. To demonstrate the technique let us consider the following example: unit CalcIntf; interface type ICalculator = interface procedure Clear; procedure Add(AValue: Integer); procedure Sub(AValue: Integer); function GetAccumulator: Integer; end; implementation end. Here is a standard Delphi implementation of ICalculator ...
Favorite? Off-Topic? Serg @ 2012-04-01 06:06

Statistics

Visits: 1324
Votes: 6
Favorites: 1
Off-Topic: 0

Visits by Source

User Actions

Users who voted for this posting

Alister Christie
Chris
Daniele Teti
GunSmoker
Thomas Nitzschke
Wouter
Subscribe:
Contact us to advertise on DelphiFeeds.com

Community Links

Torry Firebird News

Sponsor

 
Please login or register to use this functionality.
(click on this box to dismiss)