MCPcopy Create free account
hub / github.com/SOUI2/soui / class_def

Function class_def

components/ScriptModule-LUA/lua_tinker/lua_tinker.h:844–855  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

842 // Tinker Class Functions
843 template<typename T, typename F>
844 void class_def(lua_State* L, const char* name, F func)
845 {
846 push_meta(L, class_name<T>::name());
847 if(lua_istable(L, -1))
848 {
849 lua_pushstring(L, name);
850 new(lua_newuserdata(L,sizeof(F))) F(func);
851 push_functor(L, func);
852 lua_rawset(L, -3);
853 }
854 lua_pop(L, 1);
855 }
856
857 // Tinker Class Variables
858 template<typename T, typename BASE, typename VAR>

Callers

nothing calls this directly

Calls 5

nameFunction · 0.85
lua_pushstringFunction · 0.85
lua_newuserdataFunction · 0.85
push_functorFunction · 0.85
lua_rawsetFunction · 0.85

Tested by

no test coverage detected