[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Lua - C++ Bindings
- From: Anders Backman <andersb@...>
- Date: Wed, 21 Jan 2009 11:57:26 +0100
So right now the consensus for some of you is that due to the various ways of binding classes, methods, arguments, ref-non-ref C++ code makes automatic binding a large hazzle that in the end will just obfuscate the core code that is needed...
I can buy this argument too.
But then, if you have to write all these template instantiations to bind namespaces, classes etc, you will have a dual representation of your classes which is ok if you "own" the project. But now and then you get updates from rendering toolkits and other dependencies, then you sometime have a major task updating the bindings.
In that case, tolua++ give you an alternative to have a similar representation at least.
Updating a class is merely copying a .h file, stripping out info thats not needed and go from there.
However I had problems where I had to add namespaces all over the place.
For example binding osg required in many cases that I had to add namespaces to a lot of the arguments used...
Also getting enums correctly between namespaces/libraries was somewhat of a mess..
I will for now leave the automatic C++-> Lua trail for a while.
If anyone has more ideas feel free to post them.
I think there were a few lua/c++ bindings added in this post...
On Wed, Jan 21, 2009 at 11:26 AM, Elbers, H.P. <H.P.Elbers@boskalis.nl>
> From: firstname.lastname@example.org
> [mailto:email@example.com] On Behalf Of
> Jose Luis Hidalgo
You might also want to try doxygen to generate info on xml format about
> I will try to have a look at cpp2xml, and lqt, and see what
> we can do there.
classes (with details about all members)
A minimal config (doxy.cfg, in the directory where the sources are)
GENERATE_TAGFILE = tags.xml
EXTRACT_ALL = YES
RECURSIVE = YES
The xml is generated with 'doxygen doyxy.cfg'