Hi,
I previously asked what is the difference between the supported $Interfaces types. eg: Corba vs COM.
From those replies, they are very much the same, except that Corba
interfaces are NOT reference counted.
So what do I use to create interfaces and classes that implement interfaces? Which declaration style do I use? Or doesn't it make a difference?
type
ICommand = interface(IInterface)
vs
ICommand = interface(IUnkown)
vs
ICommand = interface
Now for created classes that implement those interfaces. What base object do I use?
type
TCommandClass = class(TInterfacedObject, ICommand) vs
TCommandClass = class(TSomeCustomNonReferenceCountedClass, ICommand)
I can't imagine that usig Corba style interfaces that I'm allowed to use TInterfacedObject as a based class, because TInterfacedObject implements reference counting. Is there some other base class I'm supposed to use with Corba style interfaces?
Does FPC have a Non-Reference counted base class already? It's quite simple to implement you own, but is stupid if FPC doesn't already have one.
Also, do I have to specify {$Interfaces Corba} in every unit I have, or is it only needed in the using that defines the interface itself? Basically, is that compiler setting unit based or project (global) based. Why I ask, is because {$mode xxx} is unit based, not global across my whole project. So can I mix Reference counted and Non-Reference counted interface styles in the same project?
I found find any help referencing these issues.... The help topics on interfaces and $Interfaces styles are very vague.
Regards,
- Graeme -
_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://opensoft.homeip.net/fpgui/
