lua-users home
lua-l archive

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


-----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 [1], 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.

Tim

[1] 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/

iQEcBAEBAgAGBQJNFQQkAAoJENSbqLBCyKKsL+MIAISH8Y5K1iNsCcamXjt978k6
nvimJ1i/2JxaGY/ARHUamfydQ6fEG6rGFsn2UC7a3EJL7yHTIiXITh54NYQ+mDJp
MSJNKFHMB4XxixFJIgECE4XGddZ2VhUEdQK/ET852NY+Wx/ifD4CoWRSq1ew889w
Iddz1c6tZFUAk32SgaLp0J2/zu3TbxT678EPPUxmsWG6GJTUE3wZsGxF5pKrCUi0
7Gy7fx4AKFPJno4yzN1sJswPIYTP3LB4Pg4fml2CuCvsfqbVBoCoNMn5EvTCUjmb
PLPdmFiVx8kdcbkoralGc1OY5+f0ZbmoQSiiuYBFzjOuR+IjStb4aQLjI1TgERQ=
=gO3i
-----END PGP SIGNATURE-----