lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


Hi.

On Tue, Jan 20, 2009 at 11:13 AM, Anders Backman <andersb@cs.umu.se> wrote:
> - LuaBind
[...]
>   * Full support of virtual methods

do you know if this is documented? I didn't see anything on their
manual, but I'd love to see how this kind of thing is implemented.

> - tolua++
>   * Do not support virtual methods in lua

http://lua-users.org/wiki/ImplementingVirtualMethodsWithToluapp

this should work (if not, I'll fix it).

> - luaQT (right now specialized for QT, but...)
>   * Parse .h files of the target API
>   * Require you to filter out unwanted classes, but after that its automatic
>   * Does not handle namespaces

If I'm not mistaken, this is called 'lqt' (unless this is the "full"
name). Not to be confused with lua_qt wich is a tolua++ binding of
qt4.

> Right now yet another way would be to use cpp2xml (like luaQT) and generate
> cleaned up .pkg files and run those through tolua++. However this would not
> give me support for virtual methods, this would be added to tolua++...

I've been wanting to do something like this for a while, but I haven't
found the time. It's either xml -> pkg -> tolua, or just make tolua
capable of directly parsing the xml files.. generated pkg files would
probably be the easiest way, if you can handle the extra layer of
hacking (running the xml parser on the makefiles, debugging the
intermediate .pkg files, etc).

And it would solve the main problem with the solution to implement
virtual methods on lua, which is acquiring all the methods at all
levels of inheritance. This would probably make the qt bindings _huge_
tho.

>
> Looking for quite some feedback because I know this is a hot issue!
>
> Cheers, Anders
>
>

Ariel.