CommonLibSSE (powerof3)
Loading...
Searching...
No Matches
NiObjectNET.h
Go to the documentation of this file.
1#pragma once
2
4#include "RE/N/NiObject.h"
6
7namespace RE
8{
9 class NiExtraData;
10 class NiTimeController;
11
12 class NiObjectNET : public NiObject
13 {
14 public:
15 inline static constexpr auto RTTI = RTTI_NiObjectNET;
16 inline static constexpr auto Ni_RTTI = NiRTTI_NiObjectNET;
17 inline static constexpr auto VTABLE = VTABLE_NiObjectNET;
18
19 ~NiObjectNET() override; // 00
20
21 // override (NiObject)
22 const NiRTTI* GetRTTI() const override; // 02
23 void LoadBinary(NiStream& a_stream) override; // 18
24 void LinkObject(NiStream& a_stream) override; // 19
25 bool RegisterStreamables(NiStream& a_stream) override; // 1A
26 void SaveBinary(NiStream& a_stream) override; // 1B
27 bool IsEqual(NiObject* a_object) override; // 1C
28 void ProcessClone(NiCloningProcess& a_cloning) override; // 1D
29 void PostLinkObject(NiStream& a_stream) override; // 1E
30
31 bool AddExtraData(const BSFixedString& a_key, NiExtraData* a_extra);
32 bool AddExtraData(NiExtraData* a_extra);
33 void DeleteExtraData(std::uint16_t a_extraDataIndex);
34 [[nodiscard]] NiTimeController* GetControllers() const;
35 NiTimeController* GetController(const NiRTTI* a_rtti) const;
36
37 template <class T>
38 [[nodiscard]] T* GetController() const;
39
40 [[nodiscard]] NiExtraData* GetExtraData(const BSFixedString& a_key) const;
41 template <class T>
42 [[nodiscard]] T* GetExtraData(const BSFixedString& a_key) const;
43
44 [[nodiscard]] NiExtraData* GetExtraDataAt(std::uint16_t a_extraDataIndex) const;
45 [[nodiscard]] std::uint16_t GetExtraDataSize() const;
46 [[nodiscard]] bool HasExtraData(const BSFixedString& a_key) const;
49 bool RemoveExtraData(const BSFixedString& a_key);
50 bool RemoveExtraDataAt(std::uint16_t a_extraDataIndex);
51 bool SetExtraDataSize(std::uint16_t a_size);
52
53 // members
57 std::uint16_t extraDataSize; // 28
58 std::uint16_t maxSize; // 2A
59 std::uint32_t pad2C; // 2C
60 };
61 static_assert(sizeof(NiObjectNET) == 0x30);
62
63 template <class T>
65 {
66 const REL::Relocation<const NiRTTI*> rtti{ T::Ni_RTTI };
67 return static_cast<T*>(GetController(rtti.get()));
68 }
69
70 template <class T>
72 {
73 return static_cast<T*>(GetExtraData(a_key));
74 }
75}
Definition Relocation.h:210
Definition NiCloningProcess.h:10
Definition NiExtraData.h:9
Definition NiObjectNET.h:13
bool AddExtraData(NiExtraData *a_extra)
void LoadBinary(NiStream &a_stream) override
void LinkObject(NiStream &a_stream) override
BSFixedString name
Definition NiObjectNET.h:54
bool InsertExtraData(NiExtraData *a_extra)
NiExtraData * GetExtraDataAt(std::uint16_t a_extraDataIndex) const
NiTimeController * GetControllers() const
~NiObjectNET() override
NiPointer< NiTimeController > controllers
Definition NiObjectNET.h:55
bool SetExtraDataSize(std::uint16_t a_size)
bool RegisterStreamables(NiStream &a_stream) override
static constexpr auto Ni_RTTI
Definition NiObjectNET.h:16
NiExtraData ** extra
Definition NiObjectNET.h:56
NiTimeController * GetController(const NiRTTI *a_rtti) const
bool AddExtraData(const BSFixedString &a_key, NiExtraData *a_extra)
std::uint32_t pad2C
Definition NiObjectNET.h:59
std::uint16_t GetExtraDataSize() const
static constexpr auto VTABLE
Definition NiObjectNET.h:17
bool HasExtraData(const BSFixedString &a_key) const
void DeleteExtraData(std::uint16_t a_extraDataIndex)
std::uint16_t maxSize
Definition NiObjectNET.h:58
bool IsEqual(NiObject *a_object) override
static constexpr auto RTTI
Definition NiObjectNET.h:15
void ProcessClone(NiCloningProcess &a_cloning) override
void SaveBinary(NiStream &a_stream) override
bool RemoveExtraDataAt(std::uint16_t a_extraDataIndex)
NiExtraData * GetExtraData(const BSFixedString &a_key) const
const NiRTTI * GetRTTI() const override
std::uint16_t extraDataSize
Definition NiObjectNET.h:57
void PostLinkObject(NiStream &a_stream) override
T * GetController() const
Definition NiObjectNET.h:64
bool RemoveExtraData(const BSFixedString &a_key)
void RemoveAllExtraData()
Definition NiObject.h:37
Definition NiSmartPointer.h:9
Definition NiRTTI.h:6
Definition NiStream.h:29
Definition NiTimeController.h:13
Definition AbsorbEffect.h:6
constexpr REL::ID NiRTTI_NiObjectNET(static_cast< std::uint64_t >(523910))
constexpr REL::ID RTTI_NiObjectNET(static_cast< std::uint64_t >(684826))
constexpr std::array< REL::ID, 1 > VTABLE_NiObjectNET
Definition Offsets_VTABLE.h:12240