LeviLamina
Loading...
Searching...
No Matches
ActorMigratedDefinitionFactory.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/core/string/HashedString.h"
7#include "mc/deps/puv/ComponentStorageLoadDataRefVariant.h"
8#include "mc/deps/resource_processing/category/CategoryLoader.h"
9#include "mc/world/level/storage/Experiments.h"
10
11// auto generated forward declare list
12// clang-format off
13class ActorDefinition;
17class SemVersion;
20namespace JsonComponentGlueUtils { struct ActorLoaderTraits; }
21namespace JsonComponentGlueUtils { struct CustomUpgradeData; }
22namespace SharedTypes::Beta { struct ActorDefinitions; }
23namespace SharedTypes::Beta { struct ActorDocument; }
24namespace SharedTypes::Legacy { struct ActorDocumentCorrected; }
25namespace SharedTypes::v1_21_100 { struct ActorDocument; }
26namespace SharedTypes::v1_21_110 { struct ActorDocument; }
27namespace SharedTypes::v1_21_120 { struct ActorDocument; }
28namespace SharedTypes::v1_21_130 { struct ActorDocument; }
29namespace SharedTypes::v1_21_90 { struct ActorDocument; }
30namespace SharedTypes::v1_26_0 { struct ActorDocument; }
31namespace SharedTypes::v1_26_10 { struct ActorDocument; }
32namespace SharedTypes::v1_26_20 { struct ActorDocument; }
33namespace SharedTypes::v1_26_30 { struct ActorDocument; }
34namespace SharedTypes::v1_26_40 { struct ActorDefinitions; }
35namespace SharedTypes::v1_26_40 { struct ActorDocument; }
36namespace cereal { class DynamicValue; }
37namespace cereal { struct ReflectionCtx; }
38// clang-format on
39
40class ActorMigratedDefinitionFactory {
41public:
42 // ActorMigratedDefinitionFactory inner types define
43 enum class InitResult : int {
44 Success = 0,
45 BetaFeaturesNotEnabled = 1,
46 GenericGoalSuffixMissing = 2,
47 };
48
49 using FillDefinitionCb = ::std::function<::ActorMigratedDefinitionFactory::InitResult(
54 )>;
55
56 using FillDescriptionCb = ::ActorMigratedDefinitionFactory::InitResult (*)(
62 );
63
64 using LoaderPtr =
65 ::std::unique_ptr<::Bedrock::Resources::CategoryLoader<::JsonComponentGlueUtils::ActorLoaderTraits>>;
66
68
69 using SerializerPtr = ::std::unique_ptr<::IJsonDefinitionSerializer>;
70
71public:
72 // member variables
73 // NOLINTBEGIN
74 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::cereal::ReflectionCtx>> mCerealContext;
75 ::ll::TypedStorage<8, 72, ::Experiments const> mExperiments;
76 ::ll::TypedStorage<8, 64, ::std::unordered_map<::HashedString, ::std::unique_ptr<::IJsonDefinitionSerializer>>>
77 mDefinitionSerializers;
78 ::ll::TypedStorage<
79 8,
80 24,
81 ::std::vector<::ActorMigratedDefinitionFactory::InitResult (*)(
87 )>>
88 mFillActorDescriptionCbs;
89 ::ll::TypedStorage<
90 8,
91 24,
92 ::std::vector<::std::function<::ActorMigratedDefinitionFactory::InitResult(
97 )>>>
98 mFillActorDefinitionCbs;
99 ::ll::TypedStorage<
100 8,
101 264,
102 ::std::tuple<
103 ::std::vector<void (*)(::Puv::CerealUpgrader<
107 ::std::vector<void (*)(::Puv::CerealUpgrader<
111 ::std::vector<void (*)(::Puv::CerealUpgrader<
115 ::std::vector<void (*)(::Puv::CerealUpgrader<
119 ::std::vector<void (*)(::Puv::CerealUpgrader<
123 ::std::vector<void (*)(::Puv::CerealUpgrader<
127 ::std::vector<void (*)(::Puv::CerealUpgrader<
131 ::std::vector<void (*)(::Puv::CerealUpgrader<
135 ::std::vector<void (*)(::Puv::CerealUpgrader<
139 ::std::vector<void (*)(::Puv::CerealUpgrader<
143 ::std::vector<void (*)(::Puv::CerealUpgrader<
147 mLegacyUpgradeCallbacks;
148 ::ll::TypedStorage<8, 16, ::std::map<::HashedString, ::SemVersion>> mVersionedDefinitions;
149 ::ll::TypedStorage<
150 8,
151 8,
152 ::std::unique_ptr<::Bedrock::Resources::CategoryLoader<::JsonComponentGlueUtils::ActorLoaderTraits>>>
153 mDocumentLoader;
154 // NOLINTEND
155
156#ifdef LL_PLAT_S
157#else // LL_PLAT_C
158public:
159 // prevent constructor by default
160 ActorMigratedDefinitionFactory();
161
162#endif
163public:
164 // member functions
165 // NOLINTBEGIN
166#ifdef LL_PLAT_C
167 MCAPI explicit ActorMigratedDefinitionFactory(::Experiments const& experiments);
168
169 MCAPI void _initialize();
170#endif
171
172#ifdef LL_PLAT_S
173 MCAPI void _initialize();
174#endif
175
176 MCAPI ::IJsonDefinitionSerializer* _tryGetDefinitionSerializer(::std::string_view name) const;
177
178 MCAPI void resetLoader();
179
180 MCAPI void
181 setLoaderCustomData(::BedrockLoadContext customParseData, ::DeserializeDataSettings customUpgradeData) const;
182
183#ifdef LL_PLAT_C
184 MCAPI ~ActorMigratedDefinitionFactory();
185#endif
186 // NOLINTEND
187
188public:
189 // static functions
190 // NOLINTBEGIN
191 MCAPI static ::LegacyGoalDefinition _parseLegacyGoalDefinition(
192 ::std::string name,
193 ::cereal::DynamicValue const& def,
194 ::DeserializeDataSettings const& settings
195 );
196 // NOLINTEND
197
198public:
199 // constructor thunks
200 // NOLINTBEGIN
201#ifdef LL_PLAT_C
202 MCAPI void* $ctor(::Experiments const& experiments);
203#endif
204 // NOLINTEND
205
206public:
207 // destructor thunk
208 // NOLINTBEGIN
209#ifdef LL_PLAT_C
210 MCAPI void $dtor();
211#endif
212 // NOLINTEND
213};
Definition ActorDefinitionDescriptor.h:72
Definition ActorDefinition.h:80
Definition BedrockLoadContext.h:5
Definition CategoryLoader.h:8
Definition ComponentStorageLoadDataRefVariant.h:6
Definition Experiments.h:14
Definition IJsonDefinitionSerializer.h:13
Definition _HeaderOutputPredefine.h:400
Definition SemVersion.h:15
Definition DynamicValue.h:14
Definition DeserializeDataSettings.h:11
Definition ActorLoaderTraits.h:27
Definition CustomUpgradeData.h:15
Definition LegacyGoalDefinition.h:32
Definition ActorDefinitions.h:10
Definition ActorDocument.h:16
Definition ActorDocumentCorrected.h:16
Definition ActorDocument.h:16
Definition ActorDocument.h:16
Definition ActorDocument.h:16
Definition ActorDocument.h:17
Definition ActorDocument.h:16
Definition ActorDocument.h:17
Definition ActorDocument.h:17
Definition ActorDocument.h:17
Definition ActorDocument.h:17
Definition ActorDefinitions.h:15
Definition ActorDocument.h:17
Definition ReflectionCtx.h:11