CommonLibSSE (powerof3)
LooseFileStream.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "RE/B/BSFixedString.h"
5 #include "RE/S/Stream.h"
6 
7 namespace RE
8 {
9  namespace BSResource
10  {
11  class Location;
12 
14  public LooseFileStreamBase, // 10
15  public Stream // 00
16  {
17  public:
18  inline static constexpr auto RTTI = RTTI_BSResource____LooseFileStream;
19  inline static constexpr auto VTABLE = VTABLE_BSResource____LooseFileStream;
20 
21  ~LooseFileStream() override; // 00
22 
23  // override (Stream)
24  ErrorCode DoOpen() override; // 01
25  void DoClose() override; // 02
26  ErrorCode DoGetInfo(Info& a_info) override; // 04
27  void DoClone(BSTSmartPointer<Stream>& a_out) const override; // 05
28  ErrorCode DoRead(void* a_buffer, std::uint64_t a_toRead, std::uint64_t& a_read) const override; // 06
29  ErrorCode DoWrite(const void* a_buffer, std::uint64_t a_toWrite, std::uint64_t& a_written) const override; // 07
30  ErrorCode DoSeek(std::uint64_t a_toSeek, SeekMode a_mode, std::uint64_t& a_sought) const override; // 08
31  ErrorCode DoSetEndOfStream() override; // 09
32  bool DoGetName(BSFixedString& a_dst) const override; // 0A
33  ErrorCode DoCreateAsync(BSTSmartPointer<AsyncStream>& a_streamOut) const override; // 0B
34 #ifndef SKYRIM_SUPPORT_AE
35  static LooseFileStream* Create(BSFixedString a_prefix, BSFixedString a_dirName, BSFixedString a_fileName, std::uint32_t a_fileSize, bool a_readOnly, Location* a_location);
36 #endif
37 
38  // members
40  std::uint64_t filePos; // 40
41  void* buffer; // 48
42 
43  private:
44 #ifndef SKYRIM_SUPPORT_AE
45  LooseFileStream* Ctor(const BSFixedString& a_prefix, const BSFixedString& a_dirName, const BSFixedString& a_fileName, std::uint32_t a_fileSize, bool a_readOnly, Location* a_location);
46 #endif
47  };
48  static_assert(sizeof(LooseFileStream) == 0x50);
49  }
50 }
Definition: Location.h:17
Definition: LooseFileStream.h:16
void DoClone(BSTSmartPointer< Stream > &a_out) const override
ErrorCode DoCreateAsync(BSTSmartPointer< AsyncStream > &a_streamOut) const override
ErrorCode DoSetEndOfStream() override
static constexpr auto RTTI
Definition: LooseFileStream.h:18
ErrorCode DoRead(void *a_buffer, std::uint64_t a_toRead, std::uint64_t &a_read) const override
ErrorCode DoGetInfo(Info &a_info) override
static LooseFileStream * Create(BSFixedString a_prefix, BSFixedString a_dirName, BSFixedString a_fileName, std::uint32_t a_fileSize, bool a_readOnly, Location *a_location)
ErrorCode DoOpen() override
void * buffer
Definition: LooseFileStream.h:41
Location * location
Definition: LooseFileStream.h:39
bool DoGetName(BSFixedString &a_dst) const override
ErrorCode DoWrite(const void *a_buffer, std::uint64_t a_toWrite, std::uint64_t &a_written) const override
ErrorCode DoSeek(std::uint64_t a_toSeek, SeekMode a_mode, std::uint64_t &a_sought) const override
std::uint64_t filePos
Definition: LooseFileStream.h:40
static constexpr auto VTABLE
Definition: LooseFileStream.h:19
Definition: Stream.h:21
Definition: BSTSmartPointer.h:37
ErrorCode
Definition: ErrorCodes.h:8
SeekMode
Definition: Stream.h:14
Definition: AbsorbEffect.h:6
constexpr std::array< REL::ID, 1 > VTABLE_BSResource____LooseFileStream
Definition: Offsets_VTABLE.h:9422
constexpr REL::ID RTTI_BSResource____LooseFileStream(static_cast< std::uint64_t >(690383))
Definition: Info.h:10
Definition: LooseFileStreamBase.h:11