FastLED 3.10.6
Loading...
Searching...
No Matches

◆ makeRuntimeRpcBinding()

template<typename R, typename... Args>
fl::shared_ptr< RuntimeRpcBinding > fl::detail::makeRuntimeRpcBinding ( fl::function< R(Args...)> fn)

Definition at line 247 of file runtime_rpc_binding.h.

247 {
248 using Helper = runtime_rpc::TrampolineHelper<R, Args...>;
249 using FunctionType = fl::function<R(Args...)>;
250 // user_fn is owned by the RuntimeRpcBinding via mDestroyUserFn (see Helper::destroy).
251 FunctionType* user_fn = new FunctionType(fl::move(fn)); // ok bare allocation
253 static_cast<void*>(user_fn),
254 &Helper::trampoline,
255 &Helper::destroy,
257 sizeof...(Args),
259 );
260}
constexpr remove_reference< T >::type && move(T &&t) FL_NO_EXCEPT
Definition move.h:28
shared_ptr< T > make_shared(Args &&... args) FL_NO_EXCEPT
Definition shared_ptr.h:414
static const RpcTypeOps * ops() FL_NO_EXCEPT
static const RpcTypeOps *const * table() FL_NO_EXCEPT

References fl::FL_NO_EXCEPT, fl::make_shared(), fl::move(), fl::detail::RpcTypeOpsFor< T >::ops(), and fl::detail::runtime_rpc::ArgTypesTable< Args >::table().

Referenced by fl::Rpc::registerMethod().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: