Skip to content

devurandom/lunar

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 

Repository files navigation

Lunar C++ wrapper template

Lunar allows to wrap C++ classes for use in Lua by automating large parts of the code creation through templates.

Special methods

Lunar handles con- and destruction through several special methods (of which only T(L) and ~T() are required).

FunctionWhenAvailable data
`T(L)`upon constructionLua state (C++ object)
`oninit(L)`upon calling `new()` in Lua, after calling the constructorLua state (Lua and C++ object)
`onpush(L)`on pushing objects into Lua from C++ and when calling `new()` in LuaLua state (Lua and C++ object)
`ongc(L)`upon garbage collection, before calling the destructorLua state (Lua and C++ object)
`~T()`code that needs just the C objectjust C++ object

About

Lunar C++/Lua bridge

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages