CommonLibVR
BSResourceNiBinaryStream.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "RE/B/BSTSmartPointer.h"
4 #include "RE/E/ErrorCodes.h"
5 #include "RE/N/NiBinaryStream.h"
6 #include "RE/S/Stream.h"
7 
8 namespace RE
9 {
10  namespace BSResource
11  {
12  class Location;
13  }
14 
16  {
17  public:
18  inline static constexpr auto RTTI = RTTI_BSResourceNiBinaryStream;
19  inline static constexpr auto VTABLE = VTABLE_BSResourceNiBinaryStream;
20 
21  struct BufferType
22  {
23  public:
24  };
25 
27  BSResourceNiBinaryStream(const char* a_fileName);
29  ~BSResourceNiBinaryStream() override; // 00
30 
31  // override (NiBinaryStream)
32  bool good() const override; // 01 - { return static_cast<bool>(stream); }
33  void seek(std::int32_t a_numBytes) override; // 02
34  std::uint32_t tell() const override; // 03 - { return streamPos; }
35  void get_info(BufferInfo& a_buf) override; // 04
36  void set_endian_swap(bool a_doSwap) override; // 05
37 
38  // members
41  std::uint32_t streamPos; // 30
43 
44  private:
45  BSResourceNiBinaryStream* ctor(const char* a_name, bool a_writeable = false, BSResource::Location* a_optionalStart = 0);
46  void dtor();
47 
48  private:
49  KEEP_FOR_RE()
50  };
51  static_assert(sizeof(BSResourceNiBinaryStream) == 0x38);
52 }
#define KEEP_FOR_RE()
Definition: PCH.h:713
Definition: BSResourceNiBinaryStream.h:16
std::uint32_t streamPos
Definition: BSResourceNiBinaryStream.h:41
BSResourceNiBinaryStream(const char *a_fileName)
bool good() const override
BSTSmartPointer< BSResource::Stream > stream
Definition: BSResourceNiBinaryStream.h:39
static constexpr auto VTABLE
Definition: BSResourceNiBinaryStream.h:19
void set_endian_swap(bool a_doSwap) override
void get_info(BufferInfo &a_buf) override
std::uint32_t tell() const override
BSResourceNiBinaryStream(const std::string &a_fileName)
void seek(std::int32_t a_numBytes) override
static constexpr auto RTTI
Definition: BSResourceNiBinaryStream.h:18
BSResource::ErrorCode lastError
Definition: BSResourceNiBinaryStream.h:42
BufferType * buffer
Definition: BSResourceNiBinaryStream.h:40
Definition: Location.h:17
Definition: BSTSmartPointer.h:37
Definition: NiBinaryStream.h:6
ErrorCode
Definition: ErrorCodes.h:8
Definition: AbsorbEffect.h:6
constexpr std::array< REL::ID, 1 > VTABLE_BSResourceNiBinaryStream
Definition: Offsets_VTABLE.h:9377
constexpr REL::ID RTTI_BSResourceNiBinaryStream(static_cast< std::uint64_t >(690436))
string(const CharT(&)[N]) -> string< CharT, N - 1 >
Definition: BSResourceNiBinaryStream.h:22
Definition: NiBinaryStream.h:16