lua-users home
lua-l archive

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


Very nice rundown, a couple of clarifications about tolua++ (also biased 
since I maintain it)

On Tue, Oct 25, 2005 at 08:20:57PM -0600, mark gossage wrote:
> Input formats:
> toLua++ needs a cleaned up C/C++ header file

This is a common 'misinterpretation' about tolua.. sure, the parser can't
handle a full c++ header, but the most common case is to just include the
c/c++ headers, and add some hints (as comments) to indicate where tolua
should start/stop taking input, so you don't need to create a different
file for tolua. Plus the tolua++ parser is pretty customizable; for a
project with a consistent coding style and the right size I prefer to add
a couple of custom parsing rules and just include all the headers

> which has a few specific items in it

Not really.. other than the stuff that's not part of the c/c++ syntax
(like propeties, renaming, etc), all the input to tolua will look like a
regular c/c++ header (and all the other stuff can be defined as macros and
used on the headers).

> What is supports:
> tolua++ might not support smart pointers

It does, sort of (there's a bit of a debate over how good the support is;  
I like it).

> tolua++ doesnt seem to have it, but if you wrote the definition for std::vector in your package file, it should work.

built in std::string support, everything else can be bound like any other 
template (I think operator[] will only work with numbers tho).