3#include "mc/_HeaderOutputPredefine.h"
6#include "mc/client/gui/interface/IUIDefRepository.h"
7#include "mc/deps/core/utility/NonOwnerPointer.h"
8#include "mc/deps/json/Value.h"
9#include "mc/platform/threading/SharedLock.h"
10#include "mc/resources/ResourceLoadType.h"
34 ::ll::TypedStorage<8, 32, ::std::string> mName;
35 ::ll::TypedStorage<8, 64, ::std::unordered_map<::std::string, ::Json::Value>> mDefs;
45 MCAPI
explicit UIDefNamespace(::std::string
const& name);
47 MCAPI ::Json::Value
const& findDefInNamespace(::std::string
const& defName)
const;
49 MCAPI ~UIDefNamespace();
55 MCAPI
void* $ctor(::std::string
const& name);
69 ::ll::TypedStorage<4, 4, int> collectionIndex;
70 ::ll::TypedStorage<8, 32, ::std::string> ns;
71 ::ll::TypedStorage<8, 32, ::std::string> name;
72 ::ll::TypedStorage<8, 32, ::std::string> refNs;
73 ::ll::TypedStorage<8, 32, ::std::string> refName;
74 ::ll::TypedStorage<8, 16, ::Json::Value> jsonVal;
90 using VisitNodeFunc = ::std::function<
91 ::Json::Value&(::std::string
const&, ::std::string
const&, ::std::string
const&, ::Json::Value&)>;
93 using DefEntriesPtr = ::std::shared_ptr<::std::vector<::UIDefRepository::DefEntry>>;
95 using ReportsPtr = ::std::shared_ptr<::std::vector<::PackReport>>;
97 using UIDefNamespaceMap = ::std::unordered_map<::std::string, ::UIDefRepository::UIDefNamespace>;
102 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::ResourceLoadManager>> mResourceLoadManager;
103 ::ll::TypedStorage<8, 64, ::std::unordered_map<::std::string, ::UIDefRepository::UIDefNamespace>> mDefNamespaces;
104 ::ll::TypedStorage<8, 16, ::Json::Value> mGlobalVariables;
105 ::ll::TypedStorage<8, 8, ::std::shared_mutex> mMutex;
115 virtual void loadDefsList(
116 ::ResourceLocation
const& defsListFile,
117 ::ResourcePackStack
const& packStack,
118 ::std::function<
void(::std::vector<::PackReport>&)> onReportsReady
121 virtual void validateDefEntries(
122 ::ResourceLocation
const& defsListFile,
123 ::std::shared_ptr<::ResourcePackStack const> packStack,
124 ::std::function<
void(::std::vector<::PackReport>&)> onReportsReady
127 virtual ::Json::Value
const& findDef(::std::string
const& defNamespace, ::std::string
const& defName)
const
130 virtual ::Bedrock::Threading::SharedLock<::std::shared_mutex> acquireSharedLock() const ;
132 virtual
void syncUILoad() ;
134 virtual
void syncUILoadDefinitions() ;
136 virtual
void syncUILoadDefinitionReferences() ;
138 virtual
void cancelUIValidation() ;
140 virtual
bool isLoadingDone() const ;
142 virtual
bool isUILoadingDone() const ;
144 virtual
bool isUIValidationDone() const ;
147 forEachControl(::std::function<
void(::Json::Value const&, ::std::
string const&)> callback) ;
149 virtual ::Json::Value const& getGlobalVariables() const ;
151 virtual
void translateLegacyItemIdsInRepository(::ItemRegistryRef const itemRegistry) ;
157 MCAPI explicit UIDefRepository(::Bedrock::NotNullNonOwnerPtr<::ResourceLoadManager> resourceLoadManager);
159 MCAPI
void _applyGlobalColorFormat();
161 MCAPI
void _collectAllDefEntries(
162 ::ResourceLoadType loadType,
163 ::ResourceLocation const& defsListFile,
164 ::ResourcePackStack const& packStack,
165 ::std::shared_ptr<::std::vector<::UIDefRepository::
DefEntry>> allDefEntries,
166 ::std::shared_ptr<::std::vector<::PackReport>> packReports
169 MCAPI
void _forEachControl(
170 ::Json::Value const& value,
171 ::std::
string const& namePath,
172 ::std::function<
void(::Json::Value const&, ::std::
string const&)> callback
175 MCAPI
void _queueFinishLoad(
176 ::std::shared_ptr<::std::unordered_map<::std::
string, ::UIDefRepository::
UIDefNamespace>> defNamespaces,
177 ::std::shared_ptr<::std::vector<::PackReport>> packReportsPtr,
178 ::ResourcePackStack const& packStack,
179 ::std::function<
void(::std::vector<::PackReport>&)> onReportsReady
182 MCAPI
void _readGlobalVariables(::ResourcePackStack const& packStack);
188 MCAPI static
void _resolveReferences(
189 ::UIDefRepository::
DefEntry& defEntry,
190 ::std::vector<::UIDefRepository::
DefEntry> const& allDefEntries,
191 ::std::vector<
int> const& sortedDefEntries,
192 ::std::unordered_set<
int>& visitedRefs,
193 ::std::vector<
bool>& resolved
200 MCAPI
void* $ctor(::Bedrock::NotNullNonOwnerPtr<::ResourceLoadManager> resourceLoadManager);
206 MCAPI
void $loadDefsList(
207 ::ResourceLocation const& defsListFile,
208 ::ResourcePackStack const& packStack,
209 ::std::function<
void(::std::vector<::PackReport>&)> onReportsReady
212 MCAPI
void $validateDefEntries(
213 ::ResourceLocation const& defsListFile,
214 ::std::shared_ptr<::ResourcePackStack const> packStack,
215 ::std::function<
void(::std::vector<::PackReport>&)> onReportsReady
218 MCAPI ::Json::Value const& $findDef(::std::
string const& defNamespace, ::std::
string const& defName) const;
220 MCAPI ::Bedrock::Threading::SharedLock<::std::shared_mutex> $acquireSharedLock() const;
222 MCAPI
void $syncUILoad();
224 MCAPI
void $syncUILoadDefinitions();
226 MCAPI
void $syncUILoadDefinitionReferences();
228 MCAPI
void $cancelUIValidation();
230 MCAPI
bool $isLoadingDone() const;
232 MCAPI
bool $isUILoadingDone() const;
234 MCAPI
bool $isUIValidationDone() const;
236 MCAPI
void $forEachControl(::std::function<
void(::Json::Value const&, ::std::
string const&)> callback);
238 MCFOLD ::Json::Value const& $getGlobalVariables() const;
240 MCAPI
void $translateLegacyItemIdsInRepository(::ItemRegistryRef const itemRegistry);
Definition IUIDefRepository.h:5
Definition ItemRegistryRef.h:42
Definition PackReport.h:17
Definition ResourceLoadManager.h:19
Definition ResourceLocation.h:15
Definition ResourcePackStack.h:24
Definition UIDefRepository.h:14
Definition UIDefRepository.h:5
static MCAPI void ** $vftable()
Definition UIDefRepository.h:16