Integration with C
Tue Apr 22 09:58:00 GMT 2003

Andrew Haley wrote:
> Sure, provide this function in your header file:
> static inline void setfoo (fptr z)
> {
>   javaclass::setfoo ((RawData)z);
> }

Yes ! That was the missing link :-) I suppose the best way is to add 
this with the gcjh -append option in the build process?

>  > The question is not if I can implement a Java class completely in c++,
>  > but if it's valid to derive a Java class and create a class in c++ alone
>  > (without a java counterpart).
> No, it's not.  But the thing that mystifies me is why you might want to.

What you say above removes this need completely ;-)

>  > This derived class could then provide an api where the methods
>  > contain correctly typed arguments so that the users of the class
>  > don't have to cast to RawData all the time. Tom hinted that this
>  > would in fact not be possible.
> I still don't see why the _users_ of your library would need to cast
> to RawData.  The only code that needs to do that is your interface.

With that inlined function they don't have to ;-)

Thanks for all the help,


Geert Bevin                       Uwyn
"Use what you need"               Lambermontlaan 148               1030 Brussels
gbevin[remove] at uwyn dot com    Tel & Fax +32 2 245 41 06

PGP Fingerprint : 4E21 6399 CD9E A384 6619  719A C8F4 D40D 309F D6A9
Public PGP key  : available at servers,

More information about the Java mailing list