On 11.07.2011, at 14:26, Edzard Egberts wrote:
>> I added a wrapper that makes FLTK 1 source code compile with the FLTK
>> 3 library. This is a true wrapper, not just some #define list of new
>> names. I have started a very minimal wrapper that makes FLTK 3 source
>> code compatible to FLTK 2 as well. To verify the effort, all FLTK 1
>> tests compile and mostly run in this wrapper mode. There are still a
>> lot of bugs though!
>
> I don't like this. You added old stuff to new code, that's not light and
> fast, seems to make things complicated. Also this way goes on, to leave
> developers stuck to old code.
The wrapper happens to 99% in header files in a separate directory. There are
only very minimal additions in FLTK3 to make the wrapper work, which is, every
class has one additional pointer to the wrapper, and every virtual function has
a few lines of extra code that starts with:
if (wrapper) {
(...)
}
to keep the impact minimal. The wrapper generates very very little code if not
used! It's all happening in header files. The code is only generated if it is
actually used, and not part of the library.
An additional benefit to having the wrapper is the ability to create a perfect
wrapper into pretty much any scripting language.
- Matthias
_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk