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 
20  ~LooseFileStream() override; // 00
21 
22  // override (Stream)
23  ErrorCode DoOpen() override; // 01
24  void DoClose() override; // 02
25  ErrorCode DoGetInfo(Info& a_info) override; // 04
26  void DoClone(BSTSmartPointer<Stream>& a_out) const override; // 05
27  ErrorCode DoRead(void* a_buffer, std::uint64_t a_toRead, std::uint64_t& a_read) const override; // 06
28  ErrorCode DoWrite(const void* a_buffer, std::uint64_t a_toWrite, std::uint64_t& a_written) const override; // 07
29  ErrorCode DoSeek(std::uint64_t a_toSeek, SeekMode a_mode, std::uint64_t& a_sought) const override; // 08
30  ErrorCode DoSetEndOfStream() override; // 09
31  bool DoGetName(BSFixedString& a_dst) const override; // 0A
32  ErrorCode DoCreateAsync(BSTSmartPointer<AsyncStream>& a_streamOut) const override; // 0B
33 
34  //static LooseFileStream* Create(BSFixedString a_prefix, BSFixedString a_dirName, BSFixedString a_fileName, std::uint32_t a_fileSize, bool a_readOnly, Location* a_location);
35 
36  // members
38  std::uint64_t filePos; // 40
39  void* buffer; // 48
40 
41  private:
42  //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);
43  };
44  static_assert(sizeof(LooseFileStream) == 0x50);
45  }
46 }
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
ErrorCode DoOpen() override
void * buffer
Definition: LooseFileStream.h:39
Location * location
Definition: LooseFileStream.h:37
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:38
Definition: Stream.h:21
Definition: BSTSmartPointer.h:37
ErrorCode
Definition: ErrorCodes.h:8
SeekMode
Definition: Stream.h:14
Definition: AbsorbEffect.h:6
constexpr REL::ID RTTI_BSResource____LooseFileStream
Definition: Offsets_RTTI.h:2147
Definition: Info.h:8
Definition: LooseFileStreamBase.h:11