LeviLamina
Loading...
Searching...
No Matches
ResourcePackManager.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/deps/core/resource/ResourceLoader.h"
8#include "mc/deps/core/resource/ResourcePackStackType.h"
9#include "mc/deps/core/utility/NonOwnerPointer.h"
10
11// auto generated forward declare list
12// clang-format off
17class PackInstance;
19class ResourceGroup;
22class ResourcePack;
24struct PackIdVersion;
25namespace Core { class Path; }
26namespace mce { struct Image; }
27// clang-format on
28
29class ResourcePackManager : public ::ResourceLoader {
30public:
31 // member variables
32 // NOLINTBEGIN
48 // NOLINTEND
49
50public:
51 // prevent constructor by default
52 ResourcePackManager& operator=(ResourcePackManager const&);
53 ResourcePackManager(ResourcePackManager const&);
54 ResourcePackManager();
55
56public:
57 // virtual functions
58 // NOLINTBEGIN
59 virtual ~ResourcePackManager() /*override*/;
60
61 virtual bool load(::ResourceLocation const& resourceLocation, ::std::string& resourceStream) const /*override*/;
62
63 virtual bool load(
64 ::ResourceLocation const& resourceLocation,
65 ::std::string& resourceStream,
66 ::gsl::span<::std::string const> extensionList
67 ) const /*override*/;
68
69 virtual bool load(
70 ::ResourceLocationPair const& resourceLocation,
71 ::std::string& resourceStream,
72 ::gsl::span<::std::string const> extensions
73 ) const /*override*/;
74
75 virtual bool loadText(::ResourceLocation const& resourceLocation, ::std::string& resourceStream) const /*override*/;
76
77 virtual ::std::vector<::LoadedResourceData> loadAllVersionsOf(::ResourceLocation const& resourceLocation) const
78 /*override*/;
79
80#ifdef LL_PLAT_C
81 virtual ::mce::Image loadTexture(::ResourceLocation const& resourceLocation) const /*override*/;
82
83#endif
84 virtual bool isInStreamableLocation(::ResourceLocation const& resourceLocation) const /*override*/;
85
86 virtual bool isInStreamableLocation(
87 ::ResourceLocation const& resourceLocation,
88 ::gsl::span<::std::string const> extensionList
89 ) const /*override*/;
90
91 virtual ::Core::PathBuffer<::std::string> getPath(::ResourceLocation const& resourceLocation) const /*override*/;
92
93 virtual ::Core::PathBuffer<::std::string>
94 getPath(::ResourceLocation const& resourceLocation, ::gsl::span<::std::string const> extensionList) const
95 /*override*/;
96
97 virtual ::Core::PathBuffer<::std::string>
98 getPathContainingResource(::ResourceLocation const& resourceLocation) const /*override*/;
99
100 virtual ::Core::PathBuffer<::std::string> getPathContainingResource(
101 ::ResourceLocation const& resourceLocation,
102 ::gsl::span<::std::string const> extensionList
103 ) const /*override*/;
104
105 virtual ::std::pair<int, ::std::string_view> getPackStackIndexOfResource(
106 ::ResourceLocation const& resourceLocation,
107 ::gsl::span<::std::string const> extensionList
108 ) const /*override*/;
109
110 virtual bool hasCapability(::std::string_view requiredCapability) const;
111 // NOLINTEND
112
113public:
114 // member functions
115 // NOLINTBEGIN
117 ::std::function<::Core::PathBuffer<::std::string>()> getPath,
118 ::Bedrock::NotNullNonOwnerPtr<::IContentTierManager const> const& contentTierManager,
119 bool needsToInitialize
120 );
121
123
124 MCNAPI void _composeFullStack();
125
127 ::PackInstance const& packInstance,
128 ::std::string const& group,
129 ::std::vector<::Core::Path>& resources
130 ) const;
131
133
134 MCNAPI_C ::ContentTierIncompatibleReason canSupportPacks();
135
136 MCNAPI_C void clearStack(::ResourcePackStackType stackType);
137
139 ::ResourcePackStack& output,
140 ::ResourcePackStack const& globalStack,
141 ::ResourcePackStack const& levelStack
142 ) const;
143
144 MCNAPI_C void ensureSupportedSubpacks();
145
146 MCNAPI_C ::std::vector<::ResourceLocationPair> findAllTexturesInUse() const;
147
148 MCNAPI_C ::std::vector<::PackIdVersion> findInPacks(::ResourceLocation const& resourceLocation) const;
149
150 MCNAPI_C void finishLoadingLinkedAssets(::LinkedAssetValidator& validator);
151
152 MCNAPI_C ::std::vector<::PackInstance> getIncompatiblePacks() const;
153
154 MCNAPI ::ResourceGroup getResourcesOfGroup(::std::string const& group) const;
155
156 MCNAPI ::ResourceGroup getResourcesOfGroup(::PackInstance const& packInstance, ::std::string const& group) const;
157
158 MCNAPI ::ResourcePackStack const& getStack(::ResourcePackStackType stackType) const;
159
160 MCNAPI_C bool hasResource(::ResourceLocation const& resourceLocation) const;
161
162 MCNAPI_C bool hasResource(
163 ::ResourcePackStack const& resourcePackStack,
164 ::ResourceLocation const& resourceLocation,
165 ::gsl::span<::std::string const> extensionList
166 ) const;
167
168 MCNAPI void iteratePacks(::std::function<void(::PackInstance const&)> const& pred) const;
169
170 MCNAPI_C void onLanguageChanged();
171
172 MCNAPI void removeIf(::std::function<bool(::PackInstance const&)> const& pred);
173
174 MCNAPI_C void removePacks(::std::vector<::gsl::not_null<::ResourcePack const*>> const& packs);
175
176 MCNAPI_C void removeUnsupportedPacks();
177
179
180 MCNAPI bool setStack(::std::unique_ptr<::ResourcePackStack> stack, ::ResourcePackStackType stackType);
181 // NOLINTEND
182
183public:
184 // constructor thunks
185 // NOLINTBEGIN
186 MCNAPI void* $ctor(
187 ::std::function<::Core::PathBuffer<::std::string>()> getPath,
188 ::Bedrock::NotNullNonOwnerPtr<::IContentTierManager const> const& contentTierManager,
189 bool needsToInitialize
190 );
191 // NOLINTEND
192
193public:
194 // destructor thunk
195 // NOLINTBEGIN
196 MCNAPI void $dtor();
197 // NOLINTEND
198
199public:
200 // virtual function thunks
201 // NOLINTBEGIN
202 MCNAPI bool $load(::ResourceLocation const& resourceLocation, ::std::string& resourceStream) const;
203
204 MCNAPI bool $load(
205 ::ResourceLocation const& resourceLocation,
206 ::std::string& resourceStream,
207 ::gsl::span<::std::string const> extensionList
208 ) const;
209
210 MCNAPI bool $load(
211 ::ResourceLocationPair const& resourceLocation,
212 ::std::string& resourceStream,
213 ::gsl::span<::std::string const> extensions
214 ) const;
215
216 MCNAPI bool $loadText(::ResourceLocation const& resourceLocation, ::std::string& resourceStream) const;
217
218 MCNAPI ::std::vector<::LoadedResourceData> $loadAllVersionsOf(::ResourceLocation const& resourceLocation) const;
219
220 MCNAPI bool $isInStreamableLocation(::ResourceLocation const& resourceLocation) const;
221
223 ::ResourceLocation const& resourceLocation,
224 ::gsl::span<::std::string const> extensionList
225 ) const;
226
227 MCNAPI ::Core::PathBuffer<::std::string> $getPath(::ResourceLocation const& resourceLocation) const;
228
229 MCNAPI ::Core::PathBuffer<::std::string>
230 $getPath(::ResourceLocation const& resourceLocation, ::gsl::span<::std::string const> extensionList) const;
231
232 MCNAPI ::Core::PathBuffer<::std::string>
233 $getPathContainingResource(::ResourceLocation const& resourceLocation) const;
234
235 MCNAPI ::Core::PathBuffer<::std::string> $getPathContainingResource(
236 ::ResourceLocation const& resourceLocation,
237 ::gsl::span<::std::string const> extensionList
238 ) const;
239
240 MCNAPI ::std::pair<int, ::std::string_view> $getPackStackIndexOfResource(
241 ::ResourceLocation const& resourceLocation,
242 ::gsl::span<::std::string const> extensionList
243 ) const;
244
245 MCNAPI bool $hasCapability(::std::string_view requiredCapability) const;
246
247#ifdef LL_PLAT_C
248 MCNAPI ::mce::Image $loadTexture(::ResourceLocation const& resourceLocation) const;
249#endif
250
251
252 // NOLINTEND
253
254public:
255 // vftables
256 // NOLINTBEGIN
257 MCNAPI static void** $vftable();
258 // NOLINTEND
259};
Definition ContentTierIncompatibleReason.h:5
Definition PathBuffer.h:8
Definition Path.h:10
Definition IContentTierManager.h:13
Definition LinkedAssetValidator.h:8
Definition LoadedResourceData.h:5
Definition PackInstance.h:16
Definition PackSourceReport.h:11
Definition ResourceGroup.h:8
Definition ResourceLoader.h:17
Definition ResourceLocationPair.h:11
Definition ResourceLocation.h:15
MCAPI ::std::vector<::LoadedResourceData > $loadAllVersionsOf(::ResourceLocation const &resourceLocation) const
MCAPI::ResourceGroup getResourcesOfGroup(::std::string const &group) const
MCAPI void setPackSourceReport(::PackSourceReport &&report)
MCAPI void _composeFullStack()
MCAPI bool $load(::ResourceLocationPair const &resourceLocation, ::std::string &resourceStream, ::gsl::span<::std::string const > extensions) const
MCAPI bool $loadText(::ResourceLocation const &resourceLocation, ::std::string &resourceStream) const
MCAPI void iteratePacks(::std::function< void(::PackInstance const &)> const &pred) const
MCAPI int composeFullStack(::ResourcePackStack &output, ::ResourcePackStack const &globalStack, ::ResourcePackStack const &levelStack) const
MCAPI ResourcePackManager(::std::function<::Core::PathBuffer<::std::string >()> getPath, ::Bedrock::NotNullNonOwnerPtr<::IContentTierManager const > const &contentTierManager, bool needsToInitialize)
MCAPI void _calculateMinEngineVersionFromFullStack()
MCAPI ::Core::PathBuffer<::std::string > $getPathContainingResource(::ResourceLocation const &resourceLocation) const
MCAPI bool $isInStreamableLocation(::ResourceLocation const &resourceLocation) const
MCAPI bool $load(::ResourceLocation const &resourceLocation, ::std::string &resourceStream, ::gsl::span<::std::string const > extensionList) const
MCAPI::ResourceGroup getResourcesOfGroup(::PackInstance const &packInstance, ::std::string const &group) const
MCAPI void removeIf(::std::function< bool(::PackInstance const &)> const &pred)
static MCAPI void ** $vftable()
MCAPI bool $hasCapability(::std::string_view requiredCapability) const
MCAPI ::Core::PathBuffer<::std::string > $getPath(::ResourceLocation const &resourceLocation, ::gsl::span<::std::string const > extensionList) const
MCAPI ::std::pair< int, ::std::string_view > $getPackStackIndexOfResource(::ResourceLocation const &resourceLocation, ::gsl::span<::std::string const > extensionList) const
MCAPI void _updateLanguageSubpacks()
MCAPI void $dtor()
MCAPI void * $ctor(::std::function<::Core::PathBuffer<::std::string >()> getPath, ::Bedrock::NotNullNonOwnerPtr<::IContentTierManager const > const &contentTierManager, bool needsToInitialize)
MCAPI::ResourcePackStack const & getStack(::ResourcePackStackType stackType) const
MCAPI ::Core::PathBuffer<::std::string > $getPath(::ResourceLocation const &resourceLocation) const
MCAPI ::Core::PathBuffer<::std::string > $getPathContainingResource(::ResourceLocation const &resourceLocation, ::gsl::span<::std::string const > extensionList) const
MCAPI bool $load(::ResourceLocation const &resourceLocation, ::std::string &resourceStream) const
MCAPI void _getResourcesOfGroup(::PackInstance const &packInstance, ::std::string const &group, ::std::vector<::Core::Path > &resources) const
MCAPI bool setStack(::std::unique_ptr<::ResourcePackStack > stack, ::ResourcePackStackType stackType)
MCAPI bool $isInStreamableLocation(::ResourceLocation const &resourceLocation, ::gsl::span<::std::string const > extensionList) const
Definition ResourcePackStack.h:25
Definition ResourcePack.h:21
Definition PackIdVersion.h:10
Definition Alias.h:14
Definition Image.h:12