lua-users home
lua-l archive

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


Ha, there we lured another one out ;-)

I like what I see, especially when you dont need boost...

How hard would it be to use cpp2xml to generate this wrapper code?
Feels like it would be feasible...?

As far as I know the xml generated was in lqt parsed using lua...
But it was quite a large number of lines of code...

This certainly looks like it could work.

I dont quite understand from this quick look where and how the wrapping works.
In the test directory there are a number of header files, these are parsed somehow? Or is there some code Im missing? Like the templetized integration of the c++ classes...

Could you briefly explain how it is all put together?


On Tue, Jan 20, 2009 at 7:45 PM, Jose Luis Hidalgo <joseluis.hidalgo@gmail.com> wrote:
Hi All,

 I just want to add yet another one:

SLB: Simple Lua Binder (http://slb.pplux.com)  http://svn.pplux.com/SLB
  * templatized, similar to LuaBind but without Boost ( it is just
standard C++ )
  * supports virtual functions
  * supports namespaces
  * hybrid classes -> partially implemented in lua
  * can do inheritance from script -> using hybrid classes
  * can add methods implemented using lua api to extend functionality
on the script side.
  * very undocumented, ... but I can do better XD
  * the author is quite near and friendly, well it's me actually XD

I would like to use something like cpp2xml to generate the
wrapper-templatized code, but never got to that point, actually I like
manually wrapping even some methods I turn to lua api to improve its
use, a 1:1 lua version from C++ is not always the best solution.

If you want to give it a try, just tell me.

Cheers,
  Jose-Luis H.

On Tue, Jan 20, 2009 at 2:13 PM, Anders Backman <andersb@cs.umu.se> wrote:
>
> Hi all.
> This is probably a wildly discussed topic, but I haven't found a good
> compilation of the resources as new ones pops up all over the place, and
> others die..
> Problem: Given a C++ API I want to export classes, methods, namespaces,
> enums to lua. Being able to implement virtual methods in lua, calling them
> from C++/lua transparently...
>
> This is a the list I know about, correct me if Im wrong, perhaps someone can
> update a list on the lua site?
> - LuaBridge
>   * Templetized way of exporting C++ classes
>   * Require manual labour of explicitly listing all classes, methods enums
> that should be exported.
>   *one way only, exporting C++ to lua (no virtual callbacks to lua?)
>   * Handles namespaces?
> - LuaBind
>   * Templetized way of exporting C++ classes
>   * Require manual labour of explicitly listing all classes, methods enums
> that should be exported.
>   * Full support of virtual methods
>   * Seems to handle namespaces?
> - tolua
>   * dead
> - tolua++
>   * Parse either modified header files OR cleaned .h (.tolua/.pkg) files
>   * Require manual creation of suitable .pkg files
>   * Do not support virtual methods in lua
>   * Handle namespaces
>
> - 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
>
> More?
> What I really like about the luaQT approach is it has a big gain exporting
> numerous API:s where you want to avoid the manual labour of specifying each
> and every class/method, this is a tedious work and has to be redone each
> time you update your dependencies, unless you want to wrap everything into a
> scripting layer which you then export...
>
> 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++...
>
> Looking for quite some feedback because I know this is a hot issue!
>
> Cheers, Anders
>
>



--
 Jose L. Hidalgo Valiño (PpluX)
 ---- http://www.pplux.com ----



--
__________________________________________
Anders Backman, CTO  Algoryx Simulation AB
Uminova Science Park, Box 7973,  SE-907 19
Umeå,  Sweden
anders@algoryx.se http://www.algoryx.se
Cell: +46-70-392 64 67