CommonLibSSE NG
Loading...
Searching...
No Matches
IFunction.h
Go to the documentation of this file.
1#pragma once
2
6
7namespace RE
8{
9 namespace BSScript
10 {
11 namespace Internal
12 {
13 class VirtualMachine;
14 }
15
16 class ErrorLogger;
17 class Stack;
18 class StackFrame;
19 class TypeInfo;
20 class VMState;
21
23 {
24 public:
25 inline static constexpr auto RTTI = RTTI_BSScript__IFunction;
26
27 enum class FunctionType
28 {
29 kNormal = 0,
30 kGetter = 1,
31 kSetter = 2
32 };
33
34 enum class CallResult
35 {
36 kCompleted = 0,
37 kSetupForVM = 1,
38 kInProgress = 2,
39 kFailedRetry = 3,
40 kFailedAbort = 4
41 };
42
44 virtual ~IFunction() = default; // 00
45
46 // add
47 virtual const BSFixedString& GetName() const = 0; // 01
48 virtual const BSFixedString& GetObjectTypeName() const = 0; // 02
49 virtual const BSFixedString& GetStateName() const = 0; // 03
50 virtual TypeInfo GetReturnType() const = 0; // 04
51 virtual std::uint32_t GetParamCount() const = 0; // 05
52 virtual void GetParam(std::uint32_t a_idx, BSFixedString& a_nameOut, TypeInfo& a_typeOut) const = 0; // 06
53 virtual std::uint32_t GetStackFrameSize() const = 0; // 07
54 virtual bool GetIsNative() const = 0; // 08
55 virtual bool GetIsStatic() const = 0; // 09
56 virtual bool GetIsEmpty() const = 0; // 0A
57 virtual FunctionType GetFunctionType() const = 0; // 0B
58 virtual std::uint32_t GetUserFlags() const = 0; // 0C
59 virtual const BSFixedString& GetDocString() const = 0; // 0D
60 virtual void InsertLocals(StackFrame* a_frame) = 0; // 0E
61 virtual CallResult Call(const BSTSmartPointer<Stack>& a_stack, ErrorLogger* a_logger, Internal::VirtualMachine* a_vm, bool a_arg4) = 0; // 0F
62 virtual const BSFixedString& GetSourceFilename() const = 0; // 10
63 virtual bool TranslateIPToLineNumber(std::uint32_t a_indexPtr, std::uint32_t& a_lineNumberOut) const = 0; // 11
64 virtual bool GetVarNameForStackIndex(std::uint32_t a_idx, BSFixedString& a_nameOut) const = 0; // 12
65 virtual bool CanBeCalledFromTasklets() const = 0; // 13
66 virtual void SetCallableFromTasklets(bool a_callable) = 0; // 14
67
68 // members
69 std::uint32_t pad0C; // 0C
70 };
71 static_assert(sizeof(IFunction) == 0x10);
72 }
73}
Definition ErrorLogger.h:13
Definition IFunction.h:23
virtual const BSFixedString & GetName() const =0
virtual std::uint32_t GetParamCount() const =0
CallResult
Definition IFunction.h:35
virtual const BSFixedString & GetObjectTypeName() const =0
virtual std::uint32_t GetStackFrameSize() const =0
virtual ~IFunction()=default
virtual TypeInfo GetReturnType() const =0
virtual bool GetIsNative() const =0
virtual bool GetIsEmpty() const =0
static constexpr auto RTTI
Definition IFunction.h:25
virtual const BSFixedString & GetSourceFilename() const =0
virtual CallResult Call(const BSTSmartPointer< Stack > &a_stack, ErrorLogger *a_logger, Internal::VirtualMachine *a_vm, bool a_arg4)=0
std::uint32_t pad0C
Definition IFunction.h:69
virtual bool GetIsStatic() const =0
virtual void InsertLocals(StackFrame *a_frame)=0
virtual std::uint32_t GetUserFlags() const =0
virtual void GetParam(std::uint32_t a_idx, BSFixedString &a_nameOut, TypeInfo &a_typeOut) const =0
virtual void SetCallableFromTasklets(bool a_callable)=0
virtual const BSFixedString & GetDocString() const =0
FunctionType
Definition IFunction.h:28
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 FunctionType GetFunctionType() const =0
virtual const BSFixedString & GetStateName() const =0
virtual bool CanBeCalledFromTasklets() const =0
Definition VirtualMachine.h:46
Definition StackFrame.h:15
Definition TypeInfo.h:10
Definition BSTSmartPointer.h:36
Definition AbsorbEffect.h:6
constexpr REL::VariantID RTTI_BSScript__IFunction(689172, 397027, 0x1f01e28)
Definition BSIntrusiveRefCounted.h:8