|
Toast Engine
|
Runtime descriptor for one reflected member function. More...
#include <reflect.hpp>
Public Member Functions | |
| auto | attributeMap () const -> const nlohmann::json * |
| auto | hasAttribute (std::string_view attr_name) const -> bool |
| auto | getAttribute (std::string_view attr_name) const -> std::string |
| template<typename R = void, typename... Args> | |
| auto | call (void *obj, Args &&... args) const -> R |
| auto | callDynamic (void *obj, std::span< const std::any > args) const -> std::any |
| Calls the function with runtime-typed arguments for scripting dispatch. | |
Public Attributes | |
| std::string_view | name |
| std::string_view | return_type |
| const std::type_info * | return_type_id |
| std::span< const ParameterInfo > | parameters |
| nlohmann::json | attributes |
| Invoker | invoke = nullptr |
| DynamicInvoker | invoke_dynamic = nullptr |
Runtime descriptor for one reflected member function.
|
inlinenodiscard |
Calls the function with runtime-typed arguments for scripting dispatch.
Each element of args must hold the exact std::decay_t<ParamType> that we expect Arg count must match parameters.size() exactly