lua-users home
lua-l archive

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

Hello all,

It has been said a number of times that people do not always use tolua to expose C++ APIs to lua. So, here is a by-product of an ongoing game project, which is a templates and macros only, C++ API. Very crude at the moment, but since it is developed not-only for its own sake, it will get better.

For the moment features provided are: automatic wrapper class and static callback generation through templates. Constructors taking table arguments of the form {var=value}. Class composition. Single inheritance. 

Non-features: garbage collection, multiple inheritance, arbitrary constructors. Default constructor is required. And other that I don't remember now.

(4k!) If interested, look at the example .cpp and .lua file. Comments more than welcome.