[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: tolua++: passing C++ objects to Lua?
- From: Enrico Colombini <erix@...>
- Date: Mon, 12 Mar 2007 13:19:50 +0100
I read tolua++ manual and I found it pretty clear. I didn't understand,
however, if I can make it work in the other direction: passing objects
of known 'type' from C++ to a Lua function.
Example: if tolua++ knows of the C++ type "Thing", I need to pass a
Thing object (not necessarily originating from Lua) from C++ to a Lua
function and have Lua treat this value as if it were created by Thing:new().
In other words, I'd like to know how to push into a Lua stack a
tolua++-recognized object+tag combination from the C++ side, if that's
possible.
Enrico