MCPcopy Create free account
hub / github.com/Tracktion/choc / invokeWithArgList

Method invokeWithArgList

choc/javascript/choc_javascript.h:291–300  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

289
290template <typename ArgList>
291choc::value::Value Context::invokeWithArgList (std::string_view functionName, const ArgList& args)
292{
293 CHOC_ASSERT (pimpl != nullptr); // cannot call this on a moved-from context!
294 pimpl->prepareForCall (functionName, static_cast<uint32_t> (args.size()));
295
296 for (auto& arg : args)
297 pimpl->pushArg (arg);
298
299 return pimpl->performCall();
300}
301
302inline void Context::registerFunction (const std::string& name, NativeFunction fn)
303{

Callers 1

testJavascriptPlatformFunction · 0.80

Calls 4

prepareForCallMethod · 0.80
performCallMethod · 0.80
sizeMethod · 0.45
pushArgMethod · 0.45

Tested by 1

testJavascriptPlatformFunction · 0.64