From: Christian Szegedy Date: 2002-06-11T23:20:01+09:00 Subject: Re: ruby-qt3 proposal (c++ based extensions) Martin Man wrote: > On Tue, Jun 11, 2002 at 10:19:49PM +0900, Christian Szegedy wrote: > >>Martin Man wrote: >> >>>hi all, >>> >>>I've prepared a short proposal on how to quickly (but without loosing >>>features) create qt3 extension module for ruby, ..., if you are interested >>>please read on and comment. This proposal came from the fact that we have >>>actually gcc-xml output of all qt3 headers that can be reused somehow... >>> >>>note that such proposal does not include any talk about signals and slots, >>>these have to come yet, but it hopefully covers the c++ overloading >>>problem.. >>> >>> >> >>I proposed a similar solution already. Please refer the last thread on qt. >>I could imagine some improvement to your solution: > > > ooops, must have missed this one, but I admit I was checking just ruby-qt > yahoo group. > > >>For each qt class with virtual functions an overridable and not overridable >>version. This would improve performance in the very commmon case, when you >>know that you don't want to reimplement any virtual functions. > > > well that sounds nice, but it means walking manually thru all the header files > and marking which funtion will be overridable and which not, and this I'm > willing to give up in favor of full automatic generation, unless someone wants > to make this monkey work (only once, but it has to be done)... I was unclear on that point: for each class (not for each function), I would like to have one overridable version and one not overridable. This could automatically be done by a Ruby script using the XML file. >>For the overridable class, I would create a function pointer table (playing >>the same role as the virtual function pointer table.), having the pointer to >>the original virtual methods. If a new method on the ruby-side is defined, >>then it could change the pointer in this new method table. This, again, >>would improve runtime. > > > this seems quite nice (concerning the speed issues), but how would you catch > the method creation (in ruby) so that you can swap the function pointers ?? "method_added" Best regards, Christian