[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: SLB vs LuaBind
- From: starwing <weasley.wx@...>
- Date: Mon, 27 Dec 2010 02:23:17 +0800
2010/12/26 Jose Luis Hidalgo <firstname.lastname@example.org>:
> Mmm... Hi,
> Looks like it is pretty easy to add variable access, if you really
> need it. I can try to add it to SLB...
> About constructors SLB, supports just one constructor, but with any
> kind or number of arguments:
> .constructor() <- default
> .constructor<int,int>() <- get's two ints
Does SLB support function overload? it's a useful feature.
> also, from lua, you have some methods to retrieve info from classes
> SLB.type(...) -> returns a table with lots of info from the class,
> methods, constructors, even comments
> If you try SLB please, try the testing branch, which has a lot of
> features added:
> ... So, let me think how to add the variable accessors, and write a
> little example,...
> On Sat, Dec 25, 2010 at 4:46 PM, beo wulf <email@example.com> wrote:
>> Hi Tim,
>> Thanks for the confirmation of "feature-not-supported". :-)
>> On Fri, Dec 24, 2010 at 12:35 PM, Tim Mensch <firstname.lastname@example.org> wrote:
>>> -----BEGIN PGP SIGNED MESSAGE-----
>>> Hash: SHA1
>>> On 12/24/2010 1:54 AM, beo wulf wrote:
>>> > I have a largeish project ( ~ 100K LOC ) project currently using luabind
>>> > that I plan to switch over to something else ... possibly SLB.
>>> > Pros of SLB: small ( looks like ~ 8K LOC, so readable), compared to
>>> > LuaBind ... which I can't understand.
>>> > Cons of SLB: doesn't seem very well documented. I was wondering if
>>> > anyone know what the equiv of the following LuaBind constructs are in
>>> > SLB:
>>> > (1) variable access
>>> > .def_readwrite("name", &Foo::some_var) <-- registers ".name" in luacode
>>> > to provide read/write access to &Foo::some_var )
>>> As far as I can tell, there was no such feature in SLB. If the author
>>> sees this, he can comment more definitively, but when I did my binding
>>> compare , I couldn't find any way to expose member variables, and
>>> looking through all the tests, I couldn't find a simple example that had
>>> a class with a public variable to expose.
>>> > (2) registering constructors
>>> > .def(constructor<....>()) <-- very nice in taht I just specify the types
>>> > to the consturctor
>>> > (3) LuaBind has a nice "class info" ... where it can automatically
>>> > provide me in lua side code that takes a userdata and returns the C++
>>> > class name.
>>> I don't know about these two.
>>>  http://realmensch.org/blog/fun-lua-bindings
>>> -----BEGIN PGP SIGNATURE-----
>>> Version: GnuPG v1.4.11 (MingW32)
>>> Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
>>> -----END PGP SIGNATURE-----
> Jose L. Hidalgo Valiño (PpluX)
> ---- http://www.pplux.com ----