Linux Today: Linux News On Internet Time.

FOSDEM.org: Richard Dale, author of KDE Bindings

Jan 17, 2002, 22:04 (0 Talkback[s])
RB - What's the way you follow to write the KDE bindings? Do you have to manually write everything?
RD - I wrote a utility called 'kalyptus' by adapting the kdoc documentation tool so that it generates apis, rather than documenting them. It accepts C++ headers directly, there is no need to massage the intput first into a suitable format. As the parser reads and parses all the headers into an abstract syntax tree before generating any output, there is full access to the class hierarchy, and any inherited methods. For instance, it is possible to count methods with the same name, or to determine whether a class inherits a particular method. The bindings generator can make multiple passes through the methods in a class, unlike say SWIG, which works on a one pass/one file at a time basis.

RB - For how many classes do you have bindings?
RD - About 300 Qt classes/7000 methods, and 500 KDE classes/8000 methods for each of the three languages.

RB - What when a new release appears, like KDE3?
RD - The bindings are regenerated for each KDE release. I take a patch of the manual edits that were needed for the previous release. Then run the new headers through kalyptus, and apply the patch of manual edits. Recently, it took about a week and a half to regenerate the bindings for C/Objective-C/Java, after about two months worth of KDE C++ header changes from the previous release."

Complete Story

Related Stories: