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;
43 ::ll::TypedStorage<4, 4, int> collectionIndex;
44 ::ll::TypedStorage<8, 32, ::std::string> ns;
45 ::ll::TypedStorage<8, 32, ::std::string> name;
46 ::ll::TypedStorage<8, 32, ::std::string> refNs;
47 ::ll::TypedStorage<8, 32, ::std::string> refName;
48 ::ll::TypedStorage<8, 16, ::Json::Value> jsonVal;
52 using VisitNodeFunc = ::std::function<
53 ::Json::Value&(::std::string
const&, ::std::string
const&, ::std::string
const&, ::Json::Value&)>;
55 using DefEntriesPtr = ::std::shared_ptr<::std::vector<::UIDefRepository::DefEntry>>;
57 using ReportsPtr = ::std::shared_ptr<::std::vector<::PackReport>>;
59 using UIDefNamespaceMap = ::std::unordered_map<::std::string, ::UIDefRepository::UIDefNamespace>;
64 ::ll::TypedStorage<8, 24, ::Bedrock::NotNullNonOwnerPtr<::ResourceLoadManager>> mResourceLoadManager;
65 ::ll::TypedStorage<8, 64, ::std::unordered_map<::std::string, ::UIDefRepository::UIDefNamespace>> mDefNamespaces;
66 ::ll::TypedStorage<8, 16, ::Json::Value> mGlobalVariables;
67 ::ll::TypedStorage<8, 8, ::std::shared_mutex> mMutex;
77 virtual void loadDefsList(
78 ::ResourceLocation
const& defsListFile,
79 ::ResourcePackStack
const& packStack,
80 ::std::function<
void(::std::vector<::PackReport>&)> onReportsReady
83 virtual void validateDefEntries(
84 ::ResourceLocation
const& defsListFile,
85 ::std::shared_ptr<::ResourcePackStack const> packStack,
86 ::std::function<
void(::std::vector<::PackReport>&)> onReportsReady
89 virtual ::Json::Value
const& findDef(::std::string
const& defNamespace, ::std::string
const& defName)
const
92 virtual ::Bedrock::Threading::SharedLock<::std::shared_mutex> acquireSharedLock() const ;
94 virtual
void syncUILoad() ;
96 virtual
void syncUILoadDefinitions() ;
98 virtual
void syncUILoadDefinitionReferences() ;
100 virtual
void cancelUIValidation() ;
102 virtual
bool isLoadingDone() const ;
104 virtual
bool isUILoadingDone() const ;
106 virtual
bool isUIValidationDone() const ;
109 forEachControl(::std::function<
void(::Json::Value const&, ::std::
string const&)> callback) ;
111 virtual ::Json::Value const& getGlobalVariables() const ;
113 virtual
void translateLegacyItemIdsInRepository(::ItemRegistryRef const itemRegistry) ;
119 MCAPI explicit UIDefRepository(::Bedrock::NotNullNonOwnerPtr<::ResourceLoadManager> resourceLoadManager);
121 MCAPI
void _applyGlobalColorFormat();
123 MCAPI
void _collectAllDefEntries(
124 ::ResourceLoadType loadType,
125 ::ResourceLocation const& defsListFile,
126 ::ResourcePackStack const& packStack,
127 ::std::shared_ptr<::std::vector<::UIDefRepository::
DefEntry>> allDefEntries,
128 ::std::shared_ptr<::std::vector<::PackReport>> packReports
131 MCAPI
void _forEachControl(
132 ::Json::Value const& value,
133 ::std::
string const& namePath,
134 ::std::function<
void(::Json::Value const&, ::std::
string const&)> callback
141 MCAPI
void* $ctor(::Bedrock::NotNullNonOwnerPtr<::ResourceLoadManager> resourceLoadManager);
147 MCAPI
void $loadDefsList(
148 ::ResourceLocation const& defsListFile,
149 ::ResourcePackStack const& packStack,
150 ::std::function<
void(::std::vector<::PackReport>&)> onReportsReady
153 MCAPI
void $validateDefEntries(
154 ::ResourceLocation const& defsListFile,
155 ::std::shared_ptr<::ResourcePackStack const> packStack,
156 ::std::function<
void(::std::vector<::PackReport>&)> onReportsReady
159 MCAPI ::Json::Value const& $findDef(::std::
string const& defNamespace, ::std::
string const& defName) const;
161 MCAPI ::Bedrock::Threading::SharedLock<::std::shared_mutex> $acquireSharedLock() const;
163 MCAPI
void $syncUILoad();
165 MCAPI
void $syncUILoadDefinitions();
167 MCAPI
void $syncUILoadDefinitionReferences();
169 MCAPI
void $cancelUIValidation();
171 MCAPI
bool $isLoadingDone() const;
173 MCAPI
bool $isUILoadingDone() const;
175 MCAPI
bool $isUIValidationDone() const;
177 MCAPI
void $forEachControl(::std::function<
void(::Json::Value const&, ::std::
string const&)> callback);
179 MCFOLD ::Json::Value const& $getGlobalVariables() const;
181 MCAPI
void $translateLegacyItemIdsInRepository(::ItemRegistryRef const itemRegistry);
Definition IUIDefRepository.h:5
Definition ItemRegistryRef.h:41
Definition PackReport.h:17
Definition ResourceLoadManager.h:18
Definition ResourceLocation.h:15
Definition ResourcePackStack.h:26
Definition UIDefRepository.h:14
Definition UIDefRepository.h:5
Definition UIDefRepository.h:16