discuss-gnustep
[Top][All Lists]
Advanced

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

Re: PROPOSAL: Objective-C++


From: Wim Oudshoorn
Subject: Re: PROPOSAL: Objective-C++
Date: Tue, 20 Nov 2001 15:47:43 +0100

> On Tuesday 20 November 2001 12:32, Wim Oudshoorn wrote:
> > With everyone throwing in their favorite extensions,
> > what about:
> >
> > * forward declararion of @protocol's
> >
> > This will make it easier to map CORBA Idl to ObjectiveC
> > by just mapping types to @protocol's.
>
> by types you mean corba interfaces? how would that make ir easier :-0 ?

Ok, maybe there is another way, but what I want is make CORBA usage
transparent in ObjectiveC.  So that for exampe an interface like:

interface XXX
{
        YYY giveMyObject (in String name);
};

would work if you implemented your object in Objective C like:

@interface MyImpl: MySuperClass  <XXX>

- (id<YYY>) giveMyObject: (NSString*) name;

@end


The CORBA framework could, by using DSI/DII or other lowlevel
orb stuff, process a request on an instance of MyImpl  (this is
easy and does not require protocols)

Now the method `giveMyObject' finishes and returns an object, lets say RV.
The CORBA DSI invocation code can now figure out which IDL interface(s)
RV implements by figuring out which protocols it implement.
If DSI knows the return type it can create a corresponding CORBA object
and return this.

DISCLAIMER: I have not thought very hard about it,  (and it is
quite some time ago I was contemplating this approach) but it seems
the obvious aproach, maybe make replace <XXX> with <IDL:XXX>
or something similar.

Besides the CORBA stuff.
I sometimes like the added typechecking available with protocols and
not be able to use forward declarations limits its uses and is
just annoying.

But like most requests, it is not essential.

Wim Oudshoorn.
 



reply via email to

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