LeviLamina
Loading...
Searching...
No Matches
ExternalContentManager.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/client/resources/LoadImportedLevelData.h"
7#include "mc/deps/core/file/PathBuffer.h"
8#include "mc/deps/core/resource/PackType.h"
9#include "mc/deps/core/resource/ResourceLocation.h"
10#include "mc/deps/core/utility/EnableNonOwnerReferences.h"
11#include "mc/deps/core/utility/NonOwnerPointer.h"
12
13// auto generated forward declare list
14// clang-format off
18class ImportContext;
19class LevelLoader;
20class PackManifest;
22class PackReport;
27class SkinRepository;
28class TaskGroup;
30namespace Core { class Path; }
31// clang-format on
32
34public:
35 // ExternalContentManager inner types declare
36 // clang-format off
37 struct ImportRequestData;
38 struct LoadingContentData;
40 // clang-format on
41
42 // ExternalContentManager inner types define
43 struct ImportRequestData {
44 public:
45 // member variables
46 // NOLINTBEGIN
47 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::ImportContext>> mContext;
48 ::ll::TypedStorage<8, 32, ::Core::PathBuffer<::std::string> const> mMcContentPath;
49 ::ll::TypedStorage<1, 1, bool> mFromTemp;
50 ::ll::TypedStorage<4, 4, ::LoadImportedLevelData> mLoadLevelData;
51 ::ll::TypedStorage<1, 1, bool> mTitleLocked;
52 ::ll::TypedStorage<8, 32, ::std::string> mLevelId;
53 // NOLINTEND
54 };
55
56 struct LoadingContentData {
57 public:
58 // member variables
59 // NOLINTBEGIN
60 ::ll::TypedStorage<1, 1, ::PackType> packType;
61 ::ll::TypedStorage<8, 56, ::ResourceLocation> packLocation;
62 // NOLINTEND
63 };
64
66
67 using Importer = ::std::function<void(
68 ::std::shared_ptr<::ImportContext>,
69 ::Core::PathBuffer<::std::string> const&,
70 bool,
71 ::LoadImportedLevelData,
72 bool,
73 bool
74 )>;
75
76public:
77 // member variables
78 // NOLINTBEGIN
79 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::LevelLoader>> mLevelLoader;
80 ::ll::TypedStorage<1, 1, bool> mIsEditorModeEnabled;
81 ::ll::TypedStorage<8, 8, ::IResourcePackRepository&> mPackRepository;
82 ::ll::TypedStorage<8, 8, ::ResourcePackManager&> mPackManager;
83 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::WorldTemplateManager>> mTemplateManager;
84 ::ll::TypedStorage<8, 8, ::PackManifestFactory&> mManifestFactory;
85 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::IContentKeyProvider const>> mKeyProvider;
86 ::ll::TypedStorage<8, 16, ::std::shared_ptr<::SkinRepository>> mSkinRepository;
87 ::ll::TypedStorage<8, 8, ::PersonaRepository&> mPersonaRepository;
88 ::ll::TypedStorage<8, 8, ::PackSourceFactory&> mPackSourceFactory;
89 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::ResourceLoadManager>> mResourceLoadManager;
90 ::ll::TypedStorage<1, 1, bool> mContentInTransit;
91 ::ll::TypedStorage<
92 8,
93 40,
94 ::std::queue<
95 ::ExternalContentManager::ImportRequestData,
96 ::std::deque<::ExternalContentManager::ImportRequestData>>>
97 mQueuedContent;
98 ::ll::TypedStorage<8, 32, ::Core::PathBuffer<::std::string>> mTempImportFolder;
99 ::ll::TypedStorage<
100 8,
101 64,
102 ::std::unordered_set<
103 ::ExternalContentManager::LoadingContentData,
104 ::ExternalContentManager::LoadingContentDataHasher,
105 ::std::equal_to<::ExternalContentManager::LoadingContentData>>>
106 mLoadingContent;
107 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::TaskGroup>> mIOTaskGroup;
108 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::ExternalContentManagerProxy>> mProxy;
109 ::ll::TypedStorage<8, 16, ::std::shared_ptr<void>> mExistence;
110 // NOLINTEND
111
112public:
113 // prevent constructor by default
114 ExternalContentManager& operator=(ExternalContentManager const&);
115 ExternalContentManager(ExternalContentManager const&);
116 ExternalContentManager();
117
118public:
119 // virtual functions
120 // NOLINTBEGIN
121 virtual ~ExternalContentManager() /*override*/ = default;
122
123 virtual void importContent(
124 ::std::shared_ptr<::ImportContext> context,
125 ::Core::PathBuffer<::std::string> const& mcContentPath,
126 bool fromTemp,
127 ::LoadImportedLevelData loadLevelData,
128 bool isSubcomponent,
129 bool isTitleLocked,
130 ::std::string const& levelId
131 );
132 // NOLINTEND
133
134public:
135 // member functions
136 // NOLINTBEGIN
137 MCAPI ExternalContentManager(
138 ::Bedrock::NotNullNonOwnerPtr<::LevelLoader> const& levelLoader,
139 ::IResourcePackRepository& packRepository,
140 ::ResourcePackManager& packManager,
141 ::Bedrock::NotNullNonOwnerPtr<::WorldTemplateManager> const& templateManager,
142 ::PackManifestFactory& manifestFactory,
143 ::Bedrock::NotNullNonOwnerPtr<::IContentKeyProvider const> const& keyProvider,
144 ::std::shared_ptr<::SkinRepository> skinRepo,
145 ::PersonaRepository& personaRepo,
146 ::PackSourceFactory& packSourceFactory,
147 ::Bedrock::NotNullNonOwnerPtr<::ResourceLoadManager> resourceLoadManager,
148 bool isEditorModeEnabled
149 );
150
151 MCAPI void _importMCPack(
152 ::std::shared_ptr<::ImportContext> context,
153 ::ResourceLocation const& location,
154 ::PackManifest const& manifest,
155 ::PackReport const& report,
156 bool fromTemp,
157 bool isTitleLocked
158 );
159
160 MCAPI void _importMCWorld(
161 ::std::shared_ptr<::ImportContext> context,
162 ::Core::Path const& mcWorldPath,
163 bool fromTemp,
164 ::LoadImportedLevelData loadLevelData,
165 ::std::string const& levelId
166 );
167
168 MCAPI void _packImportCompleted();
169 // NOLINTEND
170
171public:
172 // constructor thunks
173 // NOLINTBEGIN
174 MCAPI void* $ctor(
175 ::Bedrock::NotNullNonOwnerPtr<::LevelLoader> const& levelLoader,
176 ::IResourcePackRepository& packRepository,
177 ::ResourcePackManager& packManager,
178 ::Bedrock::NotNullNonOwnerPtr<::WorldTemplateManager> const& templateManager,
179 ::PackManifestFactory& manifestFactory,
180 ::Bedrock::NotNullNonOwnerPtr<::IContentKeyProvider const> const& keyProvider,
181 ::std::shared_ptr<::SkinRepository> skinRepo,
182 ::PersonaRepository& personaRepo,
183 ::PackSourceFactory& packSourceFactory,
184 ::Bedrock::NotNullNonOwnerPtr<::ResourceLoadManager> resourceLoadManager,
185 bool isEditorModeEnabled
186 );
187 // NOLINTEND
188
189public:
190 // virtual function thunks
191 // NOLINTBEGIN
192 MCAPI void $importContent(
193 ::std::shared_ptr<::ImportContext> context,
194 ::Core::PathBuffer<::std::string> const& mcContentPath,
195 bool fromTemp,
196 ::LoadImportedLevelData loadLevelData,
197 bool isSubcomponent,
198 bool isTitleLocked,
199 ::std::string const& levelId
200 );
201 // NOLINTEND
202};
Definition EnableNonOwnerReferences.h:7
Definition Path.h:11
Definition ExternalContentManagerProxy.h:5
Definition ExternalContentManager.h:5
Definition IContentKeyProvider.h:13
Definition IResourcePackRepository.h:34
Definition ImportContext.h:5
Definition LevelLoader.h:5
Definition PackManifestFactory.h:19
Definition PackManifest.h:38
Definition PackReport.h:16
Definition PackSourceFactory.h:33
Definition PersonaRepository.h:5
Definition ResourceLoadManager.h:18
Definition ResourcePackManager.h:38
Definition SkinRepository.h:5
Definition TaskGroup.h:61
Definition WorldTemplateManager.h:21
Definition ExternalContentManager.h:15
Definition ExternalContentManager.h:19
Definition ExternalContentManager.h:17