CommonLibSSE (powerof3)
Loading...
Searching...
No Matches
Location.h
Go to the documentation of this file.
1#pragma once
2
4#include "RE/E/ErrorCodes.h"
6
7namespace RE
8{
9 namespace BSResource
10 {
11 class AsyncStream;
12 class LocationTraverser;
13 class Stream;
14 struct Info;
15
17 {
18 public:
19 inline static constexpr auto RTTI = RTTI_BSResource__Location;
20 inline static constexpr auto VTABLE = VTABLE_BSResource__Location;
21
23 virtual ~Location(); // 00
24
25 // add
26 virtual ErrorCode DoMount(); // 01 - { return ErrorCode::kNone; }
27 virtual void DoUnmount(); // 02 - { return; }
28 virtual ErrorCode DoCreateStream(const char* a_path, BSTSmartPointer<Stream>& a_stream, Location*& a_location, bool a_readOnly) = 0; // 03
29 virtual ErrorCode DoCreateAsyncStream(const char* a_path, BSTSmartPointer<AsyncStream>& a_out, Location*& a_location, bool a_readOnly); // 04 - { return ErrorCode::kUnsupported; }
30 virtual ErrorCode DoTraversePrefix(const char* a_path, LocationTraverser& a_traverser) = 0; // 05
31 virtual ErrorCode DoGetInfo1(const char* a_path, Info& a_info, Location*& a_location); // 06 - { return ErrorCode::kUnsupported; }
32 virtual ErrorCode DoGetInfo2(const char* a_path, Info& a_info, LocationTraverser* a_traverser); // 07 - { return ErrorCode::kUnsupported; }
33 virtual ErrorCode DoDelete(const char* a_path); // 08 - { return ErrorCode::kUnsupported; }
34 [[nodiscard]] virtual const char* DoGetName() const; // 09 - { return 0; }
35 [[nodiscard]] virtual std::uint32_t DoQBufferHint() const; // 0A - { return 0x80000; }
36 [[nodiscard]] virtual std::uint32_t DoGetMinimumAsyncPacketSize() const; // 0B - { return 0x80000; }
37
39
40 ErrorCode DoGetInfo(const char* a_path, Info& a_info, Location*& a_location);
41 ErrorCode DoGetInfo(const char* a_path, Info& a_info, LocationTraverser* a_traverser);
42
43 // members
44 bool mounted; // 08
45 std::uint8_t pad09; // 09
46 std::uint16_t pad0A; // 0A
47 std::uint32_t pad0C; // 0C
48 };
49 static_assert(sizeof(Location) == 0x10);
50 }
51}
Definition LocationTraverser.h:10
Definition Location.h:17
ErrorCode DoGetInfo(const char *a_path, Info &a_info, Location *&a_location)
virtual std::uint32_t DoQBufferHint() const
std::uint8_t pad09
Definition Location.h:45
virtual const char * DoGetName() const
virtual ErrorCode DoMount()
virtual ErrorCode DoGetInfo2(const char *a_path, Info &a_info, LocationTraverser *a_traverser)
virtual std::uint32_t DoGetMinimumAsyncPacketSize() const
virtual ErrorCode DoDelete(const char *a_path)
bool mounted
Definition Location.h:44
virtual ErrorCode DoTraversePrefix(const char *a_path, LocationTraverser &a_traverser)=0
virtual void DoUnmount()
virtual ErrorCode DoCreateAsyncStream(const char *a_path, BSTSmartPointer< AsyncStream > &a_out, Location *&a_location, bool a_readOnly)
static constexpr auto VTABLE
Definition Location.h:20
ErrorCode DoGetInfo(const char *a_path, Info &a_info, LocationTraverser *a_traverser)
static constexpr auto RTTI
Definition Location.h:19
std::uint16_t pad0A
Definition Location.h:46
std::uint32_t pad0C
Definition Location.h:47
virtual ErrorCode DoGetInfo1(const char *a_path, Info &a_info, Location *&a_location)
virtual ErrorCode DoCreateStream(const char *a_path, BSTSmartPointer< Stream > &a_stream, Location *&a_location, bool a_readOnly)=0
Definition BSTSmartPointer.h:37
ErrorCode
Definition ErrorCodes.h:8
Definition AbsorbEffect.h:6
constexpr std::array< REL::ID, 1 > VTABLE_BSResource__Location
Definition Offsets_VTABLE.h:9403
constexpr REL::ID RTTI_BSResource__Location(static_cast< std::uint64_t >(684914))
Definition Info.h:10