CommonLibSSE (Parapets fork)
Loading...
Searching...
No Matches
RE::BSScript::NativeFunction< IS_LONG, F, R, Base, Args > Class Template Reference

#include <NativeFunction.h>

Inheritance diagram for RE::BSScript::NativeFunction< IS_LONG, F, R, Base, Args >:
RE::BSScript::NF_util::NativeFunctionBase RE::BSScript::IFunction RE::BSIntrusiveRefCounted RE::BSScript::NativeLatentFunction< R(BSScript::IVirtualMachine *, Int, Cls, Args...), R, Cls, Args... > RE::NativeFunction< R(BSScript::IVirtualMachine *, Int, Cls, Args...), std::enable_if_t< BSScript::is_valid_latent_sig_v< Int, R, Cls, Args... > > >

Public Types

using result_type = R
 
using base_type = Base
 
using function_type = F
 
- Public Types inherited from RE::BSScript::IFunction
enum class  FunctionType { kNormal = 0 , kGetter = 1 , kSetter = 2 }
 
enum class  CallResult {
  kCompleted = 0 , kSetupForVM = 1 , kInProgress = 2 , kFailedRetry = 3 ,
  kFailedAbort = 4
}
 

Public Member Functions

 NativeFunction ()=delete
 
 NativeFunction (const NativeFunction &)=delete
 
 NativeFunction (NativeFunction &&)=delete
 
 NativeFunction (std::string_view a_fnName, std::string_view a_className, function_type a_callback)
 
 ~NativeFunction () override=default
 
bool HasStub () const override
 
bool MarshallAndDispatch (Variable &a_baseValue, Internal::VirtualMachine &a_vm, VMStackID a_stackID, Variable &a_resultValue, const StackFrame &a_frame) const override
 
- Public Member Functions inherited from RE::BSScript::NF_util::NativeFunctionBase
 NativeFunctionBase ()=delete
 
 NativeFunctionBase (std::string_view a_fnName, std::string_view a_className, bool a_isStatic, std::uint16_t a_numParams)
 
 ~NativeFunctionBase () override=default
 
const BSFixedStringGetName () const override
 
const BSFixedStringGetObjectTypeName () const override
 
const BSFixedStringGetStateName () const override
 
TypeInfo GetReturnType () const override
 
std::uint32_t GetParamCount () const override
 
void GetParam (std::uint32_t a_idx, BSFixedString &a_nameOut, TypeInfo &a_typeOut) const override
 
std::uint32_t GetStackFrameSize () const override
 
bool GetIsNative () const override
 
bool GetIsStatic () const override
 
bool GetIsEmpty () const override
 
FunctionType GetFunctionType () const override
 
std::uint32_t GetUserFlags () const override
 
const BSFixedStringGetDocString () const override
 
void InsertLocals (StackFrame *a_frame) override
 
CallResult Call (const BSTSmartPointer< Stack > &a_stack, ErrorLogger *a_logger, Internal::VirtualMachine *a_vm, bool a_arg4) override
 
const BSFixedStringGetSourceFilename () const override
 
bool TranslateIPToLineNumber (std::uint32_t a_taskletExecutionOffset, std::uint32_t &a_lineNumberOut) const override
 
bool GetVarNameForStackIndex (std::uint32_t a_idx, BSFixedString &a_nameOut) const override
 
bool CanBeCalledFromTasklets () const override
 
void SetCallableFromTasklets (bool a_callable) override
 
virtual bool HasStub () const =0
 
virtual bool MarshallAndDispatch (Variable &a_baseValue, Internal::VirtualMachine &a_vm, VMStackID a_stackID, Variable &a_resultValue, const StackFrame &a_frame) const =0
 
- Public Member Functions inherited from RE::BSScript::IFunction
 IFunction ()
 
virtual ~IFunction ()=default
 
virtual const BSFixedStringGetName () const =0
 
virtual const BSFixedStringGetObjectTypeName () const =0
 
virtual const BSFixedStringGetStateName () const =0
 
virtual TypeInfo GetReturnType () const =0
 
virtual std::uint32_t GetParamCount () const =0
 
virtual void GetParam (std::uint32_t a_idx, BSFixedString &a_nameOut, TypeInfo &a_typeOut) const =0
 
virtual std::uint32_t GetStackFrameSize () const =0
 
virtual bool GetIsNative () const =0
 
virtual bool GetIsStatic () const =0
 
virtual bool GetIsEmpty () const =0
 
virtual FunctionType GetFunctionType () const =0
 
virtual std::uint32_t GetUserFlags () const =0
 
virtual const BSFixedStringGetDocString () const =0
 
virtual void InsertLocals (StackFrame *a_frame)=0
 
virtual CallResult Call (const BSTSmartPointer< Stack > &a_stack, ErrorLogger *a_logger, Internal::VirtualMachine *a_vm, bool a_arg4)=0
 
virtual const BSFixedStringGetSourceFilename () const =0
 
virtual bool TranslateIPToLineNumber (std::uint32_t a_indexPtr, std::uint32_t &a_lineNumberOut) const =0
 
virtual bool GetVarNameForStackIndex (std::uint32_t a_idx, BSFixedString &a_nameOut) const =0
 
virtual bool CanBeCalledFromTasklets () const =0
 
virtual void SetCallableFromTasklets (bool a_callable)=0
 
- Public Member Functions inherited from RE::BSIntrusiveRefCounted
std::uint32_t IncRef () const
 
std::uint32_t DecRef () const
 
 TES_HEAP_REDEFINE_NEW ()
 

Protected Attributes

std::function< function_type_stub
 
- Protected Attributes inherited from RE::BSScript::NF_util::NativeFunctionBase
BSFixedString _name
 
BSFixedString _objName
 
BSFixedString _stateName { "" }
 
TypeInfo _retType
 
Internal::VDescTable _descTable
 
bool _isStatic
 
bool _isCallableFromTasklet { false }
 
bool _isLatent { false }
 
std::uint8_t _pad43 { 0 }
 
std::uint32_t _userFlags { 0 }
 
BSFixedString _docString
 
- Protected Attributes inherited from RE::BSIntrusiveRefCounted
volatile std::uint32_t _refCount { 0 }
 

Additional Inherited Members

- Public Attributes inherited from RE::BSScript::IFunction
std::uint32_t pad0C
 
- Static Public Attributes inherited from RE::BSScript::NF_util::NativeFunctionBase
static constexpr auto RTTI = RTTI_BSScript__NF_util__NativeFunctionBase
 
- Static Public Attributes inherited from RE::BSScript::IFunction
static constexpr auto RTTI = RTTI_BSScript__IFunction
 

Member Typedef Documentation

◆ base_type

template<bool IS_LONG, class F , class R , class Base , class... Args>
using RE::BSScript::NativeFunction< IS_LONG, F, R, Base, Args >::base_type = Base

◆ function_type

template<bool IS_LONG, class F , class R , class Base , class... Args>
using RE::BSScript::NativeFunction< IS_LONG, F, R, Base, Args >::function_type = F

◆ result_type

template<bool IS_LONG, class F , class R , class Base , class... Args>
using RE::BSScript::NativeFunction< IS_LONG, F, R, Base, Args >::result_type = R

Constructor & Destructor Documentation

◆ NativeFunction() [1/4]

template<bool IS_LONG, class F , class R , class Base , class... Args>
RE::BSScript::NativeFunction< IS_LONG, F, R, Base, Args >::NativeFunction ( )
delete

◆ NativeFunction() [2/4]

template<bool IS_LONG, class F , class R , class Base , class... Args>
RE::BSScript::NativeFunction< IS_LONG, F, R, Base, Args >::NativeFunction ( const NativeFunction< IS_LONG, F, R, Base, Args > &  )
delete

◆ NativeFunction() [3/4]

template<bool IS_LONG, class F , class R , class Base , class... Args>
RE::BSScript::NativeFunction< IS_LONG, F, R, Base, Args >::NativeFunction ( NativeFunction< IS_LONG, F, R, Base, Args > &&  )
delete

◆ NativeFunction() [4/4]

template<bool IS_LONG, class F , class R , class Base , class... Args>
RE::BSScript::NativeFunction< IS_LONG, F, R, Base, Args >::NativeFunction ( std::string_view  a_fnName,
std::string_view  a_className,
function_type  a_callback 
)
inline

◆ ~NativeFunction()

template<bool IS_LONG, class F , class R , class Base , class... Args>
RE::BSScript::NativeFunction< IS_LONG, F, R, Base, Args >::~NativeFunction ( )
overridedefault

Member Function Documentation

◆ HasStub()

template<bool IS_LONG, class F , class R , class Base , class... Args>
bool RE::BSScript::NativeFunction< IS_LONG, F, R, Base, Args >::HasStub ( ) const
inlineoverridevirtual

◆ MarshallAndDispatch()

template<bool IS_LONG, class F , class R , class Base , class... Args>
bool RE::BSScript::NativeFunction< IS_LONG, F, R, Base, Args >::MarshallAndDispatch ( Variable a_baseValue,
Internal::VirtualMachine a_vm,
VMStackID  a_stackID,
Variable a_resultValue,
const StackFrame a_frame 
) const
inlineoverridevirtual

Member Data Documentation

◆ _stub

template<bool IS_LONG, class F , class R , class Base , class... Args>
std::function<function_type> RE::BSScript::NativeFunction< IS_LONG, F, R, Base, Args >::_stub
protected

The documentation for this class was generated from the following file: