| 289 | |
| 290 | template <typename ArgList> |
| 291 | choc::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 | |
| 302 | inline void Context::registerFunction (const std::string& name, NativeFunction fn) |
| 303 | { |