A solution might be to modify C++ new/delete operators to allocate extra space to store an extra word for the idst oop ptr peer, which is the technique that libid uses internally. But that wont help with static allocations. :(
Or use an invertible map between C++ this ptr and the oop peer. But that probably wont play nice with GC. Regardless you will need to resolve idst message selectors on the C++ side at init time. Maybe its time for a C++ PEG? I shudder at the thought. Is there a lower-level C binding to FLTK? Kurt Rémy Mouëza wrote: > Hello, > > I am stuck in front of a problem: I would like to send messages to a > idst objects from a regular C function. However, after a look at the > compiler, the libid.c file and the generated code I don't have any > clue to make it simple and straightforward. Actually I feel lost. > > My final goal is to call that later function from C++: I am currently > writting a binding generator to be able to use the FLTK library from > idst. I am using the principles used in Qt for Ada which can be found > here: http://qt4ada.sourceforge.net/index.php?current=ada_cpp : I > derive C++ classes to be wrapped and bound then I shoul have the > derived class dispatch their virtual method to idst object (stored as > void * pointers on the C++ side) which would then either redefine the > method behaviours or simply call the C++ super method. > > Has anyone any guidelines or hints about doing this? > > > Rémy. > > _______________________________________________ > fonc mailing list > [email protected] > http://vpri.org/mailman/listinfo/fonc _______________________________________________ fonc mailing list [email protected] http://vpri.org/mailman/listinfo/fonc
