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

Function class_mem

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

Source from the content-addressed store, hash-verified

857 // Tinker Class Variables
858 template<typename T, typename BASE, typename VAR>
859 void class_mem(lua_State* L, const char* name, VAR BASE::*val)
860 {
861 push_meta(L, class_name<T>::name());
862 if(lua_istable(L, -1))
863 {
864 lua_pushstring(L, name);
865 new(lua_newuserdata(L,sizeof(mem_var<BASE,VAR>))) mem_var<BASE,VAR>(val);
866 lua_rawset(L, -3);
867 }
868 lua_pop(L, 1);
869 }
870
871 template<typename T>
872 struct class_name

Callers

nothing calls this directly

Calls 4

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

Tested by

no test coverage detected