16 template <
bool IS_LONG,
class F,
class callbackR,
class latentR,
class Base,
class... Args>
29 NativeFunction<IS_LONG, F,
std::underlying_type_t<callbackR>, Base, Args...>(a_fnName, a_className, a_callback)
31 this->
_retType = GetRawType<latentR>();
39 template <
class R,
class F,
class =
void>
42 template <
class R,
class Int,
class F,
class Cls,
class... Args>
43 class NativeLatentFunction<R, F(BSScript::Internal::VirtualMachine*, Int, Cls, Args...), std::enable_if_t<BSScript::is_valid_latent_long_sig_v<R, Int, F, Cls, Args...>>> :
87 template <
class R,
class F>
91 if (a_callableFromTasklets) {
void SetCallableFromTasklets(const char *a_className, const char *a_stateName, const char *a_fnName, bool a_callable)
virtual void ReturnFromLatent(VMStackID a_stackID, const Variable &a_val)=0
requires is_return_convertible_v< V > void ReturnLatentResult(VMStackID a_stackID, V result)
Returns a result to the stack if it is waiting for a latent function to return. This is a wrapper ove...
Definition: NativeLatentFunction.h:105
virtual bool BindNativeMethod(IFunction *a_fn)=0
void RegisterLatentFunction(std::string_view a_fnName, std::string_view a_className, F a_callback, bool a_callableFromTasklets=false)
Registers a latent function. Unlike normal native functions, latent functions do not return a result ...
Definition: NativeLatentFunction.h:88
Definition: VirtualMachine.h:46
TypeInfo _retType
Definition: NativeFunctionBase.h:65
bool _isLatent
Definition: NativeFunctionBase.h:69
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:18
NativeLatentFunction(NativeLatentFunction &&)=delete
~NativeLatentFunction() override=default
F function_type
Definition: NativeLatentFunction.h:22
NativeLatentFunction()=delete
Base base_type
Definition: NativeLatentFunction.h:21
NativeLatentFunction(const NativeLatentFunction &)=delete
callbackR result_type
Definition: NativeLatentFunction.h:20
NativeLatentFunction(std::string_view a_fnName, std::string_view a_className, function_type a_callback)
Definition: NativeLatentFunction.h:28
Definition: Variable.h:15
Definition: NativeLatentFunction.h:40
LatentStatus
Definition: NativeLatentFunction.h:60
@ kStarted
Definition: NativeLatentFunction.h:62
@ kFailed
Definition: NativeLatentFunction.h:61
Definition: AbsorbEffect.h:6
std::uint32_t VMStackID
Definition: BSCoreTypes.h:8
requires(std::invocable< std::remove_reference_t< EF >>) class scope_exit
Definition: PCH.h:153
Definition: EffectArchetypes.h:65