On this page
article
peary::utils::dispatcher_impl::NativeInterfaceWrappper
peary::utils::dispatcher_impl::NativeInterfaceWrappper
Wrapper for native interface functions that return a value. More…
#include <peary/utils/dispatcher.hpp>
Public Functions
| Name | |
|---|---|
| std::string | operator()(const std::vector< std::string > & args)Call the wrapped function with decoded arguments and return the result as a string. |
| template <std::size_t… I> std::string | decode_and_call(const std::vector< std::string > & args, std::index_sequence< I… > )Decode the arguments and call the wrapped function. |
Public Attributes
| Name | |
|---|---|
| std::function< R(Args…)> | func |
Detailed Description
template <typename R ,
typename... Args>
struct peary::utils::dispatcher_impl::NativeInterfaceWrappper;
Wrapper for native interface functions that return a value.
Template Parameters:
- R The return type of the function
- Args The types of the arguments that the function takes
Public Functions Documentation
function operator()
inline std::string operator()(
const std::vector< std::string > & args
)
Call the wrapped function with decoded arguments and return the result as a string.
Parameters:
- args The arguments to be passed to the function, encoded as strings
Return: The result of the function call, encoded as a string
function decode_and_call
template <std::size_t... I>
inline std::string decode_and_call(
const std::vector< std::string > & args,
std::index_sequence< I... >
)
Decode the arguments and call the wrapped function.
Parameters:
- args The arguments to be passed to the function, encoded as strings
Return: The result of the function call, encoded as a string
Public Attributes Documentation
variable func
std::function< R(Args...)> func;
Updated on 2025-11-14 at 11:31:23 +0100