CommonLibSSE NG
Loading...
Searching...
No Matches
NiExtraData.h
Go to the documentation of this file.
1#pragma once
2
4#include "RE/N/NiObject.h"
5
6namespace RE
7{
8 class NiExtraData : public NiObject
9 {
10 public:
11 inline static constexpr auto RTTI = RTTI_NiExtraData;
12 inline static auto Ni_RTTI = NiRTTI_NiExtraData;
13 inline static constexpr auto VTABLE = VTABLE_NiExtraData;
14
15 ~NiExtraData() override; // 00
16
17 // override (NiObject)
18 const NiRTTI* GetRTTI() const override; // 02
19 void LoadBinary(NiStream& a_stream) override; // 18
20 void LinkObject(NiStream& a_stream) override; // 19 - { return; }
21 bool RegisterStreamables(NiStream& a_stream) override; // 1A
22 void SaveBinary(NiStream& a_stream) override; // 1B
23 bool IsEqual(NiObject* a_object) override; // 1C
24
25 // add
26 [[nodiscard]] virtual bool IsStreamable() const; // 25 - { return true; }
27 [[nodiscard]] virtual bool IsCloneable() const; // 26 - { return true; }
28
29 static NiExtraData* Create(std::size_t a_size, std::uintptr_t a_vtbl);
30 template <class T>
31 static T* Create();
32
33 [[nodiscard]] const BSFixedString& GetName() const;
34 void SetName(const BSFixedString& a_name);
35
36 // members
38 };
39 static_assert(sizeof(NiExtraData) == 0x18);
40
41 template <class T>
43 {
44 return static_cast<T*>(Create(sizeof(T), T::VTABLE[0].address()));
45 }
46}
Definition NiExtraData.h:9
static T * Create()
Definition NiExtraData.h:42
static auto Ni_RTTI
Definition NiExtraData.h:12
bool RegisterStreamables(NiStream &a_stream) override
virtual bool IsCloneable() const
void SaveBinary(NiStream &a_stream) override
void LoadBinary(NiStream &a_stream) override
~NiExtraData() override
BSFixedString name
Definition NiExtraData.h:37
void SetName(const BSFixedString &a_name)
static NiExtraData * Create(std::size_t a_size, std::uintptr_t a_vtbl)
static constexpr auto RTTI
Definition NiExtraData.h:11
const NiRTTI * GetRTTI() const override
bool IsEqual(NiObject *a_object) override
static constexpr auto VTABLE
Definition NiExtraData.h:13
void LinkObject(NiStream &a_stream) override
virtual bool IsStreamable() const
const BSFixedString & GetName() const
Definition NiObject.h:37
Definition NiRTTI.h:6
Definition NiStream.h:27
Definition AbsorbEffect.h:6
constexpr std::array< REL::VariantID, 1 > VTABLE_NiExtraData
Definition Offsets_VTABLE.h:5541
constexpr REL::VariantID RTTI_NiExtraData(684976, 392713, 0x1edd440)
constexpr REL::VariantID NiRTTI_NiExtraData(523948, 410528, 0x316bea0)