CommonLibVR
BSSystemFileStorage.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "RE/B/BSStorage.h"
4 
5 namespace RE
6 {
8  {
9  public:
10  inline static constexpr auto RTTI = RTTI_BSSystemFileStorage;
11  inline static constexpr auto VTABLE = VTABLE_BSSystemFileStorage;
12 
13  struct Attributes
14  {
15  public:
16  enum class Error
17  {
18  kNone = 0,
19  kFileNotFound = 2,
20  kAlreadyExists = 3,
21  kPathNotFound = 4,
22  kWriteProtect = 5,
23  kOther = 6,
24 
25  kErrorMask = 0x7FFFFFFF,
26 
27  kUnkFlag = 1 << 31 // top bit isn't part of the error, mask 0x7FFFFFFF to get the error
28  };
29 
30  // members
32  std::uint32_t pad24; // 04
33  void* handle; // 08
34  };
35  static_assert(sizeof(Attributes) == 0x10);
36 
37  ~BSSystemFileStorage() override; // 00
38 
39  // override (BSStorage)
40  std::size_t GetSize() const override; // 01
41  std::size_t GetPosition() const override; // 02
42  BSStorageDefs::ErrorCode Seek(std::size_t a_offset, BSStorageDefs::SeekMode a_seekMode) const override; // 03
43  BSStorageDefs::ErrorCode Read(std::size_t a_numBytes, std::byte* a_bytes) const override; // 04
44  BSStorageDefs::ErrorCode Write(std::size_t a_numBytes, const std::byte* a_bytes) override; // 05
45 
46  bool IsGoodForRead() const;
47 
48  // members
50  bool unk30; // 30
51  bool unk31; // 31
52  bool goodForRead; // 32
53  std::uint8_t pad33; // 33
54  std::uint32_t pad34; // 34
55  private:
56  KEEP_FOR_RE()
57  };
58  static_assert(sizeof(BSSystemFileStorage) == 0x38);
59 }
#define KEEP_FOR_RE()
Definition: PCH.h:713
Definition: BSStorage.h:14
Definition: BSSystemFileStorage.h:8
static constexpr auto VTABLE
Definition: BSSystemFileStorage.h:11
~BSSystemFileStorage() override
std::uint32_t pad34
Definition: BSSystemFileStorage.h:54
bool IsGoodForRead() const
Attributes attributes
Definition: BSSystemFileStorage.h:49
bool goodForRead
Definition: BSSystemFileStorage.h:52
std::uint8_t pad33
Definition: BSSystemFileStorage.h:53
std::size_t GetPosition() const override
bool unk31
Definition: BSSystemFileStorage.h:51
BSStorageDefs::ErrorCode Seek(std::size_t a_offset, BSStorageDefs::SeekMode a_seekMode) const override
BSStorageDefs::ErrorCode Write(std::size_t a_numBytes, const std::byte *a_bytes) override
bool unk30
Definition: BSSystemFileStorage.h:50
static constexpr auto RTTI
Definition: BSSystemFileStorage.h:10
std::size_t GetSize() const override
BSStorageDefs::ErrorCode Read(std::size_t a_numBytes, std::byte *a_bytes) const override
ErrorCode
Definition: ErrorCodes.h:8
SeekMode
Definition: Stream.h:14
Definition: AbsorbEffect.h:6
constexpr REL::ID RTTI_BSSystemFileStorage(static_cast< std::uint64_t >(690336))
constexpr std::array< REL::ID, 1 > VTABLE_BSSystemFileStorage
Definition: Offsets_VTABLE.h:9873
Definition: BSSystemFileStorage.h:14
void * handle
Definition: BSSystemFileStorage.h:33
Error
Definition: BSSystemFileStorage.h:17
std::uint32_t pad24
Definition: BSSystemFileStorage.h:32
stl::enumeration< Error, std::uint32_t > lastError
Definition: BSSystemFileStorage.h:31