CommonLibSSE (Parapets fork)
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
22 virtual ~Location(); // 00
23
24 // add
25 virtual ErrorCode DoMount(); // 01 - { return ErrorCode::kNone; }
26 virtual void DoUnmount(); // 02 - { return; }
27 virtual ErrorCode DoCreateStream(const char* a_path, BSTSmartPointer<Stream>& a_stream, Location*& a_location, bool a_readOnly) = 0; // 03
28 virtual ErrorCode DoCreateAsyncStream(const char* a_path, BSTSmartPointer<AsyncStream>& a_out, Location*& a_location, bool a_readOnly); // 04 - { return ErrorCode::kUnsupported; }
29 virtual ErrorCode DoTraversePrefix(const char* a_path, LocationTraverser& a_traverser) = 0; // 05
30 virtual ErrorCode DoGetInfo1(const char* a_path, Info& a_info, Location*& a_location); // 06 - { return ErrorCode::kUnsupported; }
31 virtual ErrorCode DoGetInfo2(const char* a_path, Info& a_info, LocationTraverser* a_traverser); // 07 - { return ErrorCode::kUnsupported; }
32 virtual ErrorCode DoDelete(const char* a_path); // 08 - { return ErrorCode::kUnsupported; }
33 [[nodiscard]] virtual const char* DoGetName() const; // 09 - { return 0; }
34 [[nodiscard]] virtual std::uint32_t DoQBufferHint() const; // 0A - { return 0x80000; }
35 [[nodiscard]] virtual std::uint32_t DoGetMinimumAsyncPacketSize() const; // 0B - { return 0x80000; }
36
38
39 ErrorCode DoGetInfo(const char* a_path, Info& a_info, Location*& a_location);
40 ErrorCode DoGetInfo(const char* a_path, Info& a_info, LocationTraverser* a_traverser);
41
42 // members
43 bool mounted; // 08
44 std::uint8_t pad09; // 09
45 std::uint16_t pad0A; // 0A
46 std::uint32_t pad0C; // 0C
47 };
48 static_assert(sizeof(Location) == 0x10);
49 }
50}
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:44
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:43
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)
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:45
std::uint32_t pad0C
Definition: Location.h:46
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: LocationTraverser.h:10
Definition: BSTSmartPointer.h:37
ErrorCode
Definition: ErrorCodes.h:8
Definition: AbsorbEffect.h:6
constexpr REL::ID RTTI_BSResource__Location
Definition: Offsets_RTTI.h:2127
Definition: Info.h:8