Integration with C
Fri Apr 18 17:49:00 GMT 2003
>>>>> "Geert" == Geert Bevin <email@example.com> writes:
>> class Callback
>> RawData method;
Geert> I see how this would work, but my main question is how do you
Geert> get the function point in the method variable. Here you only
Geert> use it, you never provide it.
obj->method = (RawData) fnptr;
Geert> Since the interface needs to be declared in java as being
Geert> native, there's no way to write a method that takes a function
Geert> pointer argument, is there?
You have to do some of the work in C++. There's no way around that.
I think I'm not understanding your question though.
Geert> Would it be possible to derive the Callback class in C++ alone
Geert> and add a setCallback(fptr callback) method?
You can't derive a C++ class from a Java class. You have to at least
write the class declaration in Java. That's a limitation of our
implementation -- the C++ compiler doesn't know how to create a Java
More information about the Java