[fpc-pascal] CORBA interfaces: no IInterface and TInterfaceList support

Sven Barth pascaldragon at googlemail.com
Sun Oct 9 08:56:52 CEST 2016


Am 09.10.2016 00:13 schrieb "Graeme Geldenhuys" <
mailinglists at geldenhuys.co.uk>:
>
> Hi,
>
> Why doesn't CORBA have the equivalent of IInterface?

Because that interface type doesn't need it, just like TP-style objects
don't need it. IInterface (aka IUnknown) merely exists due to the reference
counting needs.

> This brings me to the second point... No TInterfaceList for CORBA style
> interfaces either. I'm guessing the reason it doesn't exist is again
> down to the fact that there is no base type for CORBA interfaces. To
> work around this, I have to use a TFPList as casting. One glaring
> problem with using TFPList, is that it is NOT thread safe, whereas
> TInterfaceList is a thread safe list. So another thing I'll have to
> implement myself.

You could always use generics, this way you'd need to write your class only
once.

Regards,
Sven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freepascal.org/pipermail/fpc-pascal/attachments/20161009/658f0f46/attachment.html>


More information about the fpc-pascal mailing list