CommonLibSSE (powerof3)
IObjectHandlePolicy.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "RE/B/BSFixedString.h"
4 #include "RE/F/FormTypes.h"
5 
6 namespace RE
7 {
8  class TESForm;
9 
10  namespace BSScript
11  {
13  {
14  public:
15  inline static constexpr auto RTTI = RTTI_BSScript__IObjectHandlePolicy;
16  inline static constexpr auto VTABLE = VTABLE_BSScript__IObjectHandlePolicy;
17 
18  virtual ~IObjectHandlePolicy(); // 00
19 
20  // add
21  [[nodiscard]] virtual bool HandleIsType(VMTypeID a_typeID, VMHandle a_handle) const = 0; // 01
22  [[nodiscard]] virtual bool IsHandleObjectAvailable(VMHandle a_handle) const = 0; // 02
23  [[nodiscard]] virtual VMHandle EmptyHandle() const = 0; // 03
24  virtual VMHandle GetHandleForObject(VMTypeID a_typeID, const void* a_srcData) const = 0; // 04
25  [[nodiscard]] virtual bool HasParent(VMHandle a_handle) const = 0; // 05
26  [[nodiscard]] virtual VMHandle GetParentHandle(VMHandle a_handle) const = 0; // 06
27  [[nodiscard]] virtual VMHandle GetHandleScriptsMovedFrom(VMHandle a_handle) const = 0; // 07
28  [[nodiscard]] virtual void* GetObjectForHandle(VMTypeID a_typeID, VMHandle a_handle) const = 0; // 08
29  virtual void PersistHandle(VMHandle a_handle) = 0; // 09
30  virtual void ReleaseHandle(VMHandle a_handle) = 0; // 0A
31  virtual void ConvertHandleToString(VMHandle a_handle, BSFixedString& a_strOut) const = 0; // 0B
32 
33  bool HandleIsType(FormType a_typeID, VMHandle a_handle);
34  VMHandle GetHandleForObject(FormType a_typeID, const TESForm* a_srcData);
36  };
37  static_assert(sizeof(IObjectHandlePolicy) == 0x8);
38  }
39 }
Definition: TESForm.h:36
Definition: AbsorbEffect.h:6
FormType
Definition: FormTypes.h:139
constexpr std::array< REL::ID, 1 > VTABLE_BSScript__IObjectHandlePolicy
Definition: Offsets_VTABLE.h:9454
std::uint32_t VMTypeID
Definition: BSCoreTypes.h:9
std::uint64_t VMHandle
Definition: BSCoreTypes.h:7
constexpr REL::ID RTTI_BSScript__IObjectHandlePolicy(static_cast< std::uint64_t >(689077))
Definition: IObjectHandlePolicy.h:13
virtual VMHandle GetHandleScriptsMovedFrom(VMHandle a_handle) const =0
virtual VMHandle GetHandleForObject(VMTypeID a_typeID, const void *a_srcData) const =0
bool HandleIsType(FormType a_typeID, VMHandle a_handle)
virtual VMHandle GetParentHandle(VMHandle a_handle) const =0
static constexpr auto RTTI
Definition: IObjectHandlePolicy.h:15
virtual void ReleaseHandle(VMHandle a_handle)=0
static constexpr auto VTABLE
Definition: IObjectHandlePolicy.h:16
virtual bool HandleIsType(VMTypeID a_typeID, VMHandle a_handle) const =0
virtual bool IsHandleObjectAvailable(VMHandle a_handle) const =0
virtual void * GetObjectForHandle(VMTypeID a_typeID, VMHandle a_handle) const =0
virtual void PersistHandle(VMHandle a_handle)=0
virtual void ConvertHandleToString(VMHandle a_handle, BSFixedString &a_strOut) const =0
virtual VMHandle EmptyHandle() const =0
VMHandle GetHandleForObject(FormType a_typeID, const TESForm *a_srcData)
TESForm * GetObjectForHandle(FormType a_typeID, VMHandle a_handle)
virtual bool HasParent(VMHandle a_handle) const =0