CommonLibVR
BSExtraData.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "RE/E/ExtraDataTypes.h"
4 #include "RE/M/MemoryManager.h"
5 
6 namespace RE
7 {
8  class BSExtraData
9  {
10  public:
11  inline static constexpr auto RTTI = RTTI_BSExtraData;
12  inline static constexpr auto VTABLE = VTABLE_BSExtraData;
13  inline static constexpr auto EXTRADATATYPE = ExtraDataType::kNone;
14 
16  virtual ~BSExtraData() = default; // 00
17 
18  // add
19  [[nodiscard]] virtual ExtraDataType GetType() const = 0; // 01
20  virtual bool IsNotEqual(const BSExtraData* a_rhs) const; // 02 - { return false; }
21 
22  static BSExtraData* Create(std::size_t a_size, std::uintptr_t a_vtbl);
23  template <class T>
24  static T* Create();
25 
26  bool operator==(const BSExtraData& a_rhs) const;
27  bool operator!=(const BSExtraData& a_rhs) const;
28 
30 
31  // members
32  BSExtraData* next; // 08
33  private:
34  KEEP_FOR_RE()
35  };
36  static_assert(sizeof(BSExtraData) == 0x10);
37 
38  template <class T>
40  {
41  return static_cast<T*>(Create(sizeof(T), T::VTABLE[0].address()));
42  }
43 }
#define KEEP_FOR_RE()
Definition: PCH.h:713
Definition: BSExtraData.h:9
static constexpr auto RTTI
Definition: BSExtraData.h:11
static constexpr auto EXTRADATATYPE
Definition: BSExtraData.h:13
virtual bool IsNotEqual(const BSExtraData *a_rhs) const
static constexpr auto VTABLE
Definition: BSExtraData.h:12
virtual ~BSExtraData()=default
bool operator!=(const BSExtraData &a_rhs) const
bool operator==(const BSExtraData &a_rhs) const
BSExtraData * next
Definition: BSExtraData.h:32
static BSExtraData * Create(std::size_t a_size, std::uintptr_t a_vtbl)
virtual ExtraDataType GetType() const =0
static T * Create()
Definition: BSExtraData.h:39
Definition: AbsorbEffect.h:6
constexpr std::array< REL::ID, 1 > VTABLE_BSExtraData
Definition: Offsets_VTABLE.h:9010
constexpr REL::ID RTTI_BSExtraData(static_cast< std::uint64_t >(513883))
@ kNone
ExtraDataType
Definition: ExtraDataTypes.h:173