lua-users home
lua-l archive

tolua++: passing C++ objects to Lua?

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


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

AltStyle によって変換されたページ (->オリジナル) /