MCPcopy Create free account
hub / github.com/OpenStarbound/OpenStarbound / registerMethod

Method registerMethod

source/core/StarLua.hpp:1811–1814  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1809template <typename T>
1810template <typename Function>
1811void LuaMethods<T>::registerMethod(String name, Function&& func) {
1812 if (!m_methods.insert(name, LuaDetail::wrapMethod(std::forward<Function>(std::move(func)))).second)
1813 throw LuaException::format("Lua method '{}' was registered twice", name);
1814}
1815
1816template <typename T>
1817template <typename Return, typename... Args, typename Function>

Callers 4

makeMethod · 0.80
makeMethod · 0.80
makeMethod · 0.80
makeMethod · 0.80

Calls 3

wrapMethodFunction · 0.85
formatFunction · 0.70
insertMethod · 0.45

Tested by

no test coverage detected