13 Jan, 2011, RoFAdmin wrote in the 1st comment:
Votes: 0
Hey all-

I was wondering if anyone has used tolua++ before? It seems like it does all the "heavy lifting" in terms of creating the bindings needed to use your C++ classes in lua.
Ive managed to get it installed and setup on Cygwin (Which ill create a post about later, cause it wasn't a wham bam thank you mam process) and am tinkering around with it now to see if i can get it to do everything i want.

One question i do have for anyone who has used it is: In my CHAR_DATA class i obviously have variables of different types such as ROOM_INDEX_DATA MOB_INDEX_DATA etc. Im presuming (correct me if im wrong) that i will also need to create bindings for each of those types if i want to access their methods and variables in my lua code as well. Is this correct?

Thanks in advance folks.
13 Jan, 2011, David Haley wrote in the 2nd comment:
Votes: 0
Yes, you need to create bindings for everything you want to access in Lua. It might or might not be smart enough to do that automatically, I don't remember. I've only used tolua++ (and similar) for toy projects to see what they did. I prefer to control at a more granular level what gets exported and how to the Lua layer; for example I do not want the actual C++ object handle to live in Lua but rather a controlled handle that can tell when its underlying C++ object was destroyed (it's a long story). If I use bindings generators, I have more work to do to insert the layer in between, so I might as well just do it all at once.
0.0/2