discuss-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Objective-C++?


From: Peter Rasmussen
Subject: Re: Objective-C++?
Date: Wed, 09 Apr 2003 14:25:17 +0200

Josh Rendlesham wrote:

> On Tue, 8 Apr 2003 00:29:11 +0200, "Tobias" <ibotty@web.de> said:
> > btw: this is just one example, there are some nice things, that are worth
> > reusing from kde. (speak about kfile plugins for gworkspace)
>
> I agree. Even beyond KDE there are a fair number of OSS C++ libraries
> that would prove to be useful if accessible from Objective-C. I
> personally was sort of interested in using the FOX GUI toolkit (written
> in C++) and the gnustep-base library together in an Objective-C program,
> taking advantage of the features offered by both. But in order to do so,
> a C wrapper would have needed to be written around FOX, which would then
> have needed to be wrapped with Objective-C code. Such a wrapper could
> probably be written much cleaner if Objective-C++ was used.

There ought to be a way to call a C++ member function from straight C.
But is this compiler dependent .. ???


Fx:  In the COM object model it's possible to call the interface of an object
      from straight C through accessing it's vtable by hand.

    cppObj->lpVtbl->MemberFunction(cppObj, arg1, arg2);


How is something like this possible with ordinary C++ objects.
Cause backstage in the C++ runtime a similar vtable is present,
but how do we get access to it ....

This would solve most of the problems in current C++ ObjC wrapping.
cause then we could have C++ ivars in ObjC and call them manually via C.

Peter








reply via email to

[Prev in Thread] Current Thread [Next in Thread]