Am 20.09.2011 08:40, schrieb Graeme Geldenhuys:
IObserver = interface ['{7504BB57-65D8-4D5D-86F1-EC8FFED8ED5E}'] procedure Update(const Subject: IInterface); end; How do I translate this to CORBA-style interfaces. CORBA interfaces don't have a base type like all COM interfaces have (eg: IUnknown) or objects have (eg: TObject). Any ideas on how I should translate the above code? Must I use the Pointer type again? That just looks ugly, and gives no hint to the developer that Update() can take any interface type.
I personally would declare my own basic interface class and derive all other interfaces from that... This of cours only works if anyone adheres / can adhere to that rule.
Why couldn't CORBA interfaces also descend from IInterface, but in the case of CORBA style interfaces that doesn't mean it's a IUnknown descendant. That way we will have a generic interface type to use in such generic code situations.
Because IInterface is designated as a COM-interface and you can't descend a CORBA-interface from a COM-interface or vice-versa. Also it's not possible to declare IInterface as a CORBA-interface, because another unit might use COM-interfaces and then the COM-style IInterface is needed.
Regards, Sven _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal