15 template <
class R =
void,
class = std::enable_if_t<is_val
id_return_v<R>>>
18 using super = std::coroutine_handle<LatentPromise<R>>;
30 operator bool() const noexcept {
return true; }
70 template <
class... Args>
87 value = std::forward<R>(a_value);
97 template <
class... Args>
110 template <
class F,
class R,
class Base,
class... Args>
124 super(a_fnName, a_className, a_callback)
132 template <
class Int,
class R,
class Cls,
class... Args>
133 class NativeFunction<R(BSScript::IVirtualMachine*, Int, Cls, Args...), std::enable_if_t<BSScript::is_valid_latent_sig_v<Int, R, Cls, Args...>>> :
Definition: IVirtualMachine.h:39
virtual void ReturnFromLatent(VMStackID a_stackID, const Variable &a_val)=0
TypeInfo _retType
Definition: NativeFunctionBase.h:62
bool _isLatent
Definition: NativeFunctionBase.h:66
Definition: NativeFunction.h:55
Base base_type
Definition: NativeFunction.h:58
R result_type
Definition: NativeFunction.h:57
F function_type
Definition: NativeFunction.h:59
Definition: NativeLatentFunction.h:112
typename super::base_type base_type
Definition: NativeLatentFunction.h:118
NativeLatentFunction(std::string_view a_fnName, std::string_view a_className, function_type a_callback)
Definition: NativeLatentFunction.h:123
typename R::result_type result_type
Definition: NativeLatentFunction.h:117
typename super::function_type function_type
Definition: NativeLatentFunction.h:119
Definition: Variable.h:15
void Pack(T &&a_src)
Definition: PackUnpack.h:292
Definition: NativeFunction.h:121
Definition: AbsorbEffect.h:6
std::uint32_t VMStackID
Definition: BSCoreTypes.h:8
Definition: NiBinaryStream.h:94
Definition: NativeLatentFunction.h:34
bool returned
Definition: NativeLatentFunction.h:63
virtual Variable GetResult()=0
std::exception_ptr exception
Definition: NativeLatentFunction.h:64
VMStackID stackID
Definition: NativeLatentFunction.h:62
std::suspend_always final_suspend() noexcept
Definition: NativeLatentFunction.h:57
LatentPromiseBase(IVirtualMachine *a_vm, VMStackID a_stackID)
Definition: NativeLatentFunction.h:35
IVirtualMachine * vm
Definition: NativeLatentFunction.h:61
virtual ~LatentPromiseBase()
Definition: NativeLatentFunction.h:40
void unhandled_exception()
Definition: NativeLatentFunction.h:59
void ReturnFromLatent()
Definition: NativeLatentFunction.h:49
std::suspend_never initial_suspend()
Definition: NativeLatentFunction.h:55
Variable GetResult() override
Definition: NativeLatentFunction.h:103
LatentResult get_return_object()
Definition: NativeLatentFunction.h:105
void return_void()
Definition: NativeLatentFunction.h:107
LatentPromise(IVirtualMachine *a_vm, VMStackID a_stackID, Args...)
Definition: NativeLatentFunction.h:98
Definition: NativeLatentFunction.h:69
LatentPromise(IVirtualMachine *a_vm, VMStackID a_stackID, Args...)
Definition: NativeLatentFunction.h:71
LatentResult< R > get_return_object()
Definition: NativeLatentFunction.h:83
R value
Definition: NativeLatentFunction.h:91
Variable GetResult() override
Definition: NativeLatentFunction.h:76
void return_value(R &&a_value)
Definition: NativeLatentFunction.h:85
Definition: NativeLatentFunction.h:17
R result_type
Definition: NativeLatentFunction.h:19
std::coroutine_handle< LatentPromise< R > > super
Definition: NativeLatentFunction.h:18
constexpr LatentResult() noexcept=default
LatentResult(super &&a_other)
Definition: NativeLatentFunction.h:27