CommonLibSSE (powerof3)
Loading...
Searching...
No Matches
NiFile.h
Go to the documentation of this file.
1#pragma once
2
4
5namespace RE
6{
7 class NiFile : public NiBinaryStream
8 {
9 public:
10 inline static constexpr auto RTTI = RTTI_NiFile;
11 inline static constexpr auto VTABLE = VTABLE_NiFile;
12
13 enum class OpenMode
14 {
15 kReadOnly = 0,
16 kWriteOnly = 1,
17 kAppendOnly = 2
18 };
19
20 ~NiFile() override; // 00
21
22 // override (NiBinaryStream)
23 bool good() const override; // 01 - { return isGood; }
24 void seek(std::int32_t a_numBytes) override; // 02
25 void get_info(BufferInfo& a_buf) override; // 04
26 void set_endian_swap(bool a_doSwap) override; // 05
27
28 // add
29 virtual void seek(std::int32_t a_offset, std::int32_t a_from); // 06
30 [[nodiscard]] virtual std::uint32_t size() const; // 07
31
32 // members
33 std::uint32_t bufferAllocSize; // 20
34 std::uint32_t bufferReadSize; // 24
35 std::uint32_t pos; // 28
36 std::uint32_t pad2C; // 2C
37 char* buffer; // 30
38 std::FILE* file; // 38
40 bool isGood; // 44
41 std::uint8_t pad45; // 45
42 std::uint16_t pad46; // 46
43 };
44 static_assert(sizeof(NiFile) == 0x48);
45}
Definition EnumSet.h:9
Definition NiBinaryStream.h:6
Definition NiFile.h:8
char * buffer
Definition NiFile.h:37
virtual std::uint32_t size() const
OpenMode
Definition NiFile.h:14
std::uint32_t pos
Definition NiFile.h:35
bool isGood
Definition NiFile.h:40
std::uint16_t pad46
Definition NiFile.h:42
bool good() const override
void seek(std::int32_t a_numBytes) override
~NiFile() override
void set_endian_swap(bool a_doSwap) override
virtual void seek(std::int32_t a_offset, std::int32_t a_from)
std::FILE * file
Definition NiFile.h:38
std::uint32_t bufferReadSize
Definition NiFile.h:34
std::uint32_t pad2C
Definition NiFile.h:36
static constexpr auto RTTI
Definition NiFile.h:10
std::uint8_t pad45
Definition NiFile.h:41
static constexpr auto VTABLE
Definition NiFile.h:11
REX::EnumSet< OpenMode, std::uint32_t > mode
Definition NiFile.h:39
void get_info(BufferInfo &a_buf) override
std::uint32_t bufferAllocSize
Definition NiFile.h:33
Definition AbsorbEffect.h:6
constexpr std::array< REL::ID, 1 > VTABLE_NiFile
Definition Offsets_VTABLE.h:12203
constexpr REL::ID RTTI_NiFile(static_cast< std::uint64_t >(690321))
Definition NiBinaryStream.h:16