CommonLibVR
BSStorage.h
Go to the documentation of this file.
1 #pragma once
2 
4 
5 namespace RE
6 {
7  namespace BSStorageDefs
8  {
9  enum class ErrorCode;
10  enum class SeekMode;
11  }
12 
14  {
15  public:
16  inline static constexpr auto RTTI = RTTI_BSStorage;
17  inline static constexpr auto VTABLE = VTABLE_BSStorage;
18 
19  struct UnkData
20  {
21  public:
22  // members
23  std::uint64_t unk00; // 00
24  std::uint64_t unk08; // 08
25  std::uint64_t unk10; // 10
26  };
27  static_assert(sizeof(UnkData) == 0x18);
28 
29  virtual ~BSStorage(); // 00
30 
31  // add
32  virtual std::size_t GetSize() const = 0; // 01
33  virtual std::size_t GetPosition() const = 0; // 02
34  virtual BSStorageDefs::ErrorCode Seek(std::size_t a_offset, BSStorageDefs::SeekMode a_seekMode) const = 0; // 03
35  virtual BSStorageDefs::ErrorCode Read(std::size_t a_numBytes, std::byte* a_bytes) const = 0; // 04
36  virtual BSStorageDefs::ErrorCode Write(std::size_t a_numBytes, const std::byte* a_bytes) = 0; // 05
37 
38  // members
39  bool swapBytes; // 0C
40  bool unk0D; // 0D
41  uint16_t unk0E; // 0E
42  UnkData* unk10; // 10
43  std::uint64_t unk18; // 18
44  private:
45  KEEP_FOR_RE()
46  };
47  static_assert(sizeof(BSStorage) == 0x20);
48 }
#define KEEP_FOR_RE()
Definition: PCH.h:713
Definition: BSStorage.h:14
virtual ~BSStorage()
virtual std::size_t GetSize() const =0
virtual BSStorageDefs::ErrorCode Write(std::size_t a_numBytes, const std::byte *a_bytes)=0
std::uint64_t unk18
Definition: BSStorage.h:43
bool swapBytes
Definition: BSStorage.h:39
uint16_t unk0E
Definition: BSStorage.h:41
bool unk0D
Definition: BSStorage.h:40
UnkData * unk10
Definition: BSStorage.h:42
virtual BSStorageDefs::ErrorCode Read(std::size_t a_numBytes, std::byte *a_bytes) const =0
static constexpr auto RTTI
Definition: BSStorage.h:16
static constexpr auto VTABLE
Definition: BSStorage.h:17
virtual BSStorageDefs::ErrorCode Seek(std::size_t a_offset, BSStorageDefs::SeekMode a_seekMode) const =0
virtual std::size_t GetPosition() const =0
ErrorCode
Definition: ErrorCodes.h:8
SeekMode
Definition: Stream.h:14
Definition: AbsorbEffect.h:6
constexpr std::array< REL::ID, 1 > VTABLE_BSStorage
Definition: Offsets_VTABLE.h:9858
constexpr REL::ID RTTI_BSStorage(static_cast< std::uint64_t >(684870))
Definition: BSIntrusiveRefCounted.h:8
Definition: BSStorage.h:20
std::uint64_t unk00
Definition: BSStorage.h:23
std::uint64_t unk08
Definition: BSStorage.h:24
std::uint64_t unk10
Definition: BSStorage.h:25