lua-users home
lua-l archive

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


I truly second that!!

/Anders

On Tue, Jan 20, 2009 at 9:08 PM, Peter Kümmel <syntheticpp@gmx.net> wrote:
Hi Jose-Luis,

very nice binding! It is much more readable than a binding done
with the C-API.

I would prefer to generate C++ code with the help of cpp2xml,
this makes the code much more readable and maintainable.
Maybe we could smoothly change lqt's generator code to produce SLB code.

Peter




Jose Luis Hidalgo 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








--
__________________________________________
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