MCPcopy Create free account
hub / github.com/TombEngine/TombEngine / MakeSpecialTable

Function MakeSpecialTable

TombEngine/Scripting/Internal/ScriptUtil.h:53–59  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

51
52template <typename TFuncIndex, typename TFuncNewIndex>
53sol::table MakeSpecialTable(sol::state* state, const std::string& name, const TFuncIndex& funcIndex, const TFuncNewIndex& funcNewIndex)
54{
55 auto meta = MakeSpecialTableBase(state, name);
56 meta.set_function("__index", funcIndex);
57 meta.set_function("__newindex", funcNewIndex);
58 return (*state)[name];
59}
60
61template <typename TFuncIndex, typename TFuncNewIndex, typename TObjPtr>
62sol::table MakeSpecialTable(sol::state* state, const std::string& name, const TFuncIndex& funcIndex, const TFuncNewIndex& funcNewIndex, TObjPtr objPtr)

Callers 4

ResetGameTablesMethod · 0.85
ResetLevelTablesMethod · 0.85
SetLevelFuncsMemberMethod · 0.85
FreeLevelScriptsMethod · 0.85

Calls 1

MakeSpecialTableBaseFunction · 0.85

Tested by

no test coverage detected