[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Luna, a small generic C++ template class
- From: Lenny Palozzi <lenny.palozzi@...>
- Date: Mon, 12 Feb 2001 19:37:47 -0500
On Mon, Feb 12, 2001 at 02:24:20PM -0800, Pete Gardner wrote:
> In what ways is this better/different than tolua?
I'll try and answer how it's different...
- tolua will bind _everything_ in a package file to Lua, my template class
doesn't, so its less feature rich than tolua. It only binds those
member functions that you specify, tolua can bind any primitive or
- my template class is probably easier to use than tolua, but that's only a
result that it's simple. It's also alot smaller than tolua and doesn't
require you to run an external build tool(tolua) to build the binding code.
My intentions were to build a system that would allow you to register class
member functions as easily as possible to Lua. Member functions that return
an int and take a lua_State*, similar to the rules laid out for C functions
registered to Lua. Thus, it turned out that it came to be similar to the
functionality that tolua provides.
If you have existing classes that you would like to enable in Lua, then tolua
is the right tool. If you're just starting to code your class and would also
like to enable it in Lua, then this template class may be of help.