[fpc-pascal] problems with CORBA interfaces having no base type

Graeme Geldenhuys graemeg.lists at gmail.com
Tue Sep 20 09:47:59 CEST 2011


On 20/09/2011 09:31, Sven Barth wrote:
> 
> 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.

I thought of this, but then my code is not very reusable by other
developers. Everybody else would have to change there base interface
type for all there interfaces. Not viable at all.


> Because IInterface is designated as a COM-interface and you can't 
> descend a CORBA-interface from a COM-interface or vice-versa.

This is not what I meant. Just like the compiler has compiler modes, why
can't the {$interfaces corba} change the "mode" of IInterface. The name
also says it's a "generic interface type", so maybe the compiler could
that inject the following

  IInterface = interface
  end;

...overriding (or better, hiding) the old COM declaration of...

  IInterface = IIUnkown


So then in CORBA style interfaces, the following two declarations mean
the same thing (just like they would if I used COM style interfaces)

{$interfaces corba}
...

  ISubject = interface
  end;

  ISubject = interface(IInterface)
  end;


Just like String can mean AnsiString or ShortString, based on a compiler
switch.


Regards,
  - Graeme -

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




More information about the fpc-pascal mailing list