LeviLamina
Loading...
Searching...
No Matches
PackAccessStrategy.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/file/PathBuffer.h"
7#include "mc/resources/PackAccessAssetGenerationResult.h"
8#include "mc/resources/PackAccessStrategyType.h"
9
10// auto generated forward declare list
11// clang-format off
12class ContentIdentity;
14namespace Bedrock::Resources { class PreloadedPathHandle; }
15namespace Bedrock::Resources::Archive { class Reader; }
16namespace Core { class Path; }
17namespace Json { class Value; }
18// clang-format on
19
21public:
22 // member variables
23 // NOLINTBEGIN
26 // NOLINTEND
27
28public:
29 // prevent constructor by default
30 PackAccessStrategy& operator=(PackAccessStrategy const&);
32
33public:
34 // virtual functions
35 // NOLINTBEGIN
36 // vIndex: 0
37 virtual ~PackAccessStrategy();
38
39 // vIndex: 1
40 virtual uint64 getPackSize() const = 0;
41
42 // vIndex: 2
43 virtual ::ResourceLocation const& getPackLocation() const = 0;
44
45 // vIndex: 3
46 virtual ::std::string const& getPackName() const = 0;
47
48 // vIndex: 4
49 virtual bool isWritable() const = 0;
50
51 // vIndex: 5
52 virtual void setIsTrusted(bool) = 0;
53
54 // vIndex: 6
55 virtual bool isTrusted() const = 0;
56
57 // vIndex: 7
58 virtual bool hasAsset(::Core::Path const&, bool, bool) const = 0;
59
60 // vIndex: 8
61 virtual bool hasFolder(::Core::Path const&) const = 0;
62
63 // vIndex: 9
64 virtual bool getAsset(::Core::Path const&, ::std::string&, bool) const = 0;
65
66 // vIndex: 10
67 virtual bool deleteAsset(::Core::Path const&) = 0;
68
69 // vIndex: 11
70 virtual bool writeAsset(::Core::Path const&, ::std::string const&) = 0;
71
72 // vIndex: 12
73 virtual void forEachIn(::Core::Path const&, ::std::function<void(::Core::Path const&)>, bool) const = 0;
74
75 // vIndex: 13
76 virtual void forEachInAssetSet(::Core::Path const&, ::std::function<void(::Core::Path const&)>) const;
77
78 // vIndex: 14
79 virtual ::PackAccessStrategyType getStrategyType() const = 0;
80
81 // vIndex: 15
82 virtual ::Core::PathBuffer<::std::string> const& getSubPath() const;
83
84 // vIndex: 16
85 virtual bool supportsSignatureVerification() const;
86
87 // vIndex: 17
88 virtual ::std::unique_ptr<::PackAccessStrategy> createSubPack(::Core::Path const&) const = 0;
89
90 // vIndex: 18
91 virtual ::PackAccessAssetGenerationResult generateAssetSet();
92
93 // vIndex: 19
94 virtual ::PackAccessAssetGenerationResult regenerateAssetSet();
95
96 // vIndex: 20
97 virtual bool canRecurse() const;
98
99 // vIndex: 21
100 virtual void unload() = 0;
101
102 // vIndex: 22
103 virtual bool hasUpgradeFiles() const;
104
105 // vIndex: 23
106 virtual ::ContentIdentity readContentIdentity() const;
107
108 // vIndex: 24
109 virtual bool isAssetExtractionViable() const;
110
111 // vIndex: 25
112 virtual ::std::unique_ptr<::Bedrock::Resources::Archive::Reader> _loadArchive(::Core::Path const&) const;
113 // NOLINTEND
114
115public:
116 // member functions
117 // NOLINTBEGIN
118 MCAPI PackAccessStrategy();
119
120 MCAPI void _addToAssetSet(::Core::Path const& path, ::std::string const& data);
121
122 MCAPI void _forEachInAssetSet(::std::function<void(::Core::Path const&)> callback) const;
123
124 MCAPI void _upgradeContentsFile(::Json::Value& root);
125
126 MCAPI ::Bedrock::Resources::PreloadedPathHandle preload(::Core::Path const& packRelativePath) const;
127 // NOLINTEND
128
129public:
130 // static variables
131 // NOLINTBEGIN
132 MCAPI static ::Core::PathBuffer<::std::string> const& PACK_IMPORT_LOCK_FILE();
133 // NOLINTEND
134
135public:
136 // constructor thunks
137 // NOLINTBEGIN
138 MCAPI void* $ctor();
139 // NOLINTEND
140
141public:
142 // destructor thunk
143 // NOLINTBEGIN
144 MCAPI void $dtor();
145 // NOLINTEND
146
147public:
148 // virtual function thunks
149 // NOLINTBEGIN
150 MCFOLD void $forEachInAssetSet(::Core::Path const&, ::std::function<void(::Core::Path const&)>) const;
151
152 MCAPI ::Core::PathBuffer<::std::string> const& $getSubPath() const;
153
154 MCFOLD bool $supportsSignatureVerification() const;
155
156 MCAPI ::PackAccessAssetGenerationResult $generateAssetSet();
157
158 MCAPI ::PackAccessAssetGenerationResult $regenerateAssetSet();
159
160 MCFOLD bool $canRecurse() const;
161
162 MCAPI bool $hasUpgradeFiles() const;
163
164 MCAPI ::ContentIdentity $readContentIdentity() const;
165
166 MCFOLD bool $isAssetExtractionViable() const;
167
168 MCFOLD ::std::unique_ptr<::Bedrock::Resources::Archive::Reader> $_loadArchive(::Core::Path const&) const;
169 // NOLINTEND
170
171public:
172 // vftables
173 // NOLINTBEGIN
174 MCAPI static void** $vftable();
175 // NOLINTEND
176};
Definition ContentIdentity.h:10
Definition Path.h:15
Definition Value.h:16
Definition PackAccessStrategy.h:20
Definition Path.h:16
Definition ResourceLocation.h:15
Definition Alias.h:14