A list of CORBA interfaces - how?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

A list of CORBA interfaces - how?

Graeme Geldenhuys-2
Hi,

I'm porting some of my old Delphi code which used interfaces
extensively. Since I moved to FPC years ago, I liked the idea of
CORBA-style interfaces, and mostly use them under FPC projects.

Anyway, some of my code used IInterfaceList / TInterfaceList, but that
uses IIInterface, which is an alias for IUnknown, which is COM-style
interfaces only.

What is the equivalent for CORBA style interfaces?  Just a TList storing
pointers?

Regards,
  - Graeme -

--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/

_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: A list of CORBA interfaces - how?

etrusco
On Tue, Sep 20, 2011 at 3:28 AM, Graeme Geldenhuys
<[hidden email]> wrote:

> Hi,
>
> I'm porting some of my old Delphi code which used interfaces
> extensively. Since I moved to FPC years ago, I liked the idea of
> CORBA-style interfaces, and mostly use them under FPC projects.
>
> Anyway, some of my code used IInterfaceList / TInterfaceList, but that
> uses IIInterface, which is an alias for IUnknown, which is COM-style
> interfaces only.
>
> What is the equivalent for CORBA style interfaces?  Just a TList storing
> pointers?
>
> Regards,
>  - Graeme -
>
> --

I've just found this: http://62.166.198.202/view.php?id=6036
And this really works! :) Even 'as' operator works (so the error
message in FPC 2.4.4 is misleading).
You can iterate over TClass.GetInferfaceTable, and if you declare an
interface name it'll appear there (I checked). Not sure whether
there's some way (or hack) to compare an (unnamed) interface with the
VMT pointer there...

Best regards,
Flávio

PS. A few days ago when Marcos Douglas was asking about CORBA vs COM I
didn't find this information :-/
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: A list of CORBA interfaces - how?

etrusco
Oops, seems I completely misread your post.
The problem is cite is the kind of (or exactly) the one you're trying to fix :-$

Thanks for Marcos for pointing that out.

-Flávio

2011/9/20 Flávio Etrusco <[hidden email]>:

> On Tue, Sep 20, 2011 at 3:28 AM, Graeme Geldenhuys
> <[hidden email]> wrote:
>> Hi,
>>
>> I'm porting some of my old Delphi code which used interfaces
>> extensively. Since I moved to FPC years ago, I liked the idea of
>> CORBA-style interfaces, and mostly use them under FPC projects.
>>
>> Anyway, some of my code used IInterfaceList / TInterfaceList, but that
>> uses IIInterface, which is an alias for IUnknown, which is COM-style
>> interfaces only.
>>
>> What is the equivalent for CORBA style interfaces?  Just a TList storing
>> pointers?
>>
>> Regards,
>>  - Graeme -
>>
>> --
>
> I've just found this: http://62.166.198.202/view.php?id=6036
> And this really works! :) Even 'as' operator works (so the error
> message in FPC 2.4.4 is misleading).
> You can iterate over TClass.GetInferfaceTable, and if you declare an
> interface name it'll appear there (I checked). Not sure whether
> there's some way (or hack) to compare an (unnamed) interface with the
> VMT pointer there...
>
> Best regards,
> Flávio
>
> PS. A few days ago when Marcos Douglas was asking about CORBA vs COM I
> didn't find this information :-/
>
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/mailman/listinfo/fpc-pascal