Languages/Smoke

From KDE TechBase
Revision as of 20:53, 26 October 2008 by Moenicke (talk | contribs) (adding PHP)

SMOKE is a introspective wrapper around the Qt and KDE frameworks. The legend says it stands for Scripting Meta Object Kompiler Engine

Not only does it provide wrappers for every function in every class, but it also contains meta-information allowing queries of what functions are available and their arguments and return-types.

All classes, all methods, with all arguments, along with various flags reflecting staticness, virtuality, etc. are stored into cross-referencing arrays for fast lookups. One can thus read (and call) the whole Qt API by simply reading/searching these arrays.

The main purpose of SMOKE is to make it possible to write bindings from scripting languages to Qt and KDE - with an emphasis on ease of use and flexibility.

You can find out more about SMOKE by checking out the kdebindings module of KDE's SVN.

At the time of writing, the Perl bindings, Ruby bindings, C# bindings and PHP bindings are known to use it, you might find valuable usage information there.