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 ActorDocument; }
35namespace SharedTypes::v1_26_50 { struct ActorDefinitions; }
36namespace SharedTypes::v1_26_50 { struct ActorDocument; }
37namespace cereal { class DynamicValue; }
38namespace cereal { struct ReflectionCtx; }
39// clang-format on
40
41class ActorMigratedDefinitionFactory {
42public:
43 // ActorMigratedDefinitionFactory inner types define
44 enum class InitResult : int {
45 Success = 0,
46 BetaFeaturesNotEnabled = 1,
47 GenericGoalSuffixMissing = 2,
48 };
49
50 using FillDefinitionCb = ::std::function<::ActorMigratedDefinitionFactory::InitResult(
55 )>;
56
57 using FillDescriptionCb = ::ActorMigratedDefinitionFactory::InitResult (*)(
63 );
64
65 using LoaderPtr =
66 ::std::unique_ptr<::Bedrock::Resources::CategoryLoader<::JsonComponentGlueUtils::ActorLoaderTraits>>;
67
69
70 using SerializerPtr = ::std::unique_ptr<::IJsonDefinitionSerializer>;
71
72public:
73 // member variables
74 // NOLINTBEGIN
75 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::cereal::ReflectionCtx>> mCerealContext;
76 ::ll::TypedStorage<8, 72, ::Experiments const> mExperiments;
77 ::ll::TypedStorage<8, 64, ::std::unordered_map<::HashedString, ::std::unique_ptr<::IJsonDefinitionSerializer>>>
78 mDefinitionSerializers;
79 ::ll::TypedStorage<
80 8,
81 24,
82 ::std::vector<::ActorMigratedDefinitionFactory::InitResult (*)(
88 )>>
89 mFillActorDescriptionCbs;
90 ::ll::TypedStorage<
91 8,
92 24,
93 ::std::vector<::std::function<::ActorMigratedDefinitionFactory::InitResult(
98 )>>>
99 mFillActorDefinitionCbs;
100 ::ll::TypedStorage<
101 8,
102 288,
103 ::std::tuple<
104 ::std::vector<void (*)(::Puv::CerealUpgrader<
108 ::std::vector<void (*)(::Puv::CerealUpgrader<
112 ::std::vector<void (*)(::Puv::CerealUpgrader<
116 ::std::vector<void (*)(::Puv::CerealUpgrader<
120 ::std::vector<void (*)(::Puv::CerealUpgrader<
124 ::std::vector<void (*)(::Puv::CerealUpgrader<
128 ::std::vector<void (*)(::Puv::CerealUpgrader<
132 ::std::vector<void (*)(::Puv::CerealUpgrader<
136 ::std::vector<void (*)(::Puv::CerealUpgrader<
140 ::std::vector<void (*)(::Puv::CerealUpgrader<
144 ::std::vector<void (*)(::Puv::CerealUpgrader<
148 ::std::vector<void (*)(::Puv::CerealUpgrader<
152 mLegacyUpgradeCallbacks;
153 ::ll::TypedStorage<8, 16, ::std::map<::HashedString, ::SemVersion>> mVersionedDefinitions;
154 ::ll::TypedStorage<
155 8,
156 8,
157 ::std::unique_ptr<::Bedrock::Resources::CategoryLoader<::JsonComponentGlueUtils::ActorLoaderTraits>>>
158 mDocumentLoader;
159 // NOLINTEND
160
161#ifdef LL_PLAT_S
162#else // LL_PLAT_C
163public:
164 // prevent constructor by default
165 ActorMigratedDefinitionFactory();
166
167#endif
168public:
169 // member functions
170 // NOLINTBEGIN
171#ifdef LL_PLAT_C
172 MCAPI explicit ActorMigratedDefinitionFactory(::Experiments const& experiments);
173
174 MCAPI void _initialize();
175#endif
176
177#ifdef LL_PLAT_S
178 MCAPI void _initialize();
179#endif
180
181 MCAPI ::IJsonDefinitionSerializer* _tryGetDefinitionSerializer(::std::string_view name) const;
182
183 MCAPI void resetLoader();
184
185 MCAPI void
186 setLoaderCustomData(::BedrockLoadContext customParseData, ::DeserializeDataSettings customUpgradeData) const;
187
188#ifdef LL_PLAT_C
189 MCAPI ~ActorMigratedDefinitionFactory();
190#endif
191 // NOLINTEND
192
193public:
194 // static functions
195 // NOLINTBEGIN
196 MCAPI static ::LegacyGoalDefinition _parseLegacyGoalDefinition(
197 ::std::string name,
198 ::cereal::DynamicValue const& def,
199 ::DeserializeDataSettings const& settings
200 );
201 // NOLINTEND
202
203public:
204 // constructor thunks
205 // NOLINTBEGIN
206#ifdef LL_PLAT_C
207 MCAPI void* $ctor(::Experiments const& experiments);
208#endif
209 // NOLINTEND
210
211public:
212 // destructor thunk
213 // NOLINTBEGIN
214#ifdef LL_PLAT_C
215 MCAPI void $dtor();
216#endif
217 // NOLINTEND
218};
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:395
Definition SemVersion.h:15
Definition DynamicValue.h:14
Definition DeserializeDataSettings.h:11
Definition ActorLoaderTraits.h:29
Definition CustomUpgradeData.h:15
Definition LegacyGoalDefinition.h:32
Definition ActorDefinitions.h:10
Definition ActorDocument.h:16
Definition ActorDocumentCorrected.h:17
Definition ActorDocument.h:17
Definition ActorDocument.h:17
Definition ActorDocument.h:17
Definition ActorDocument.h:18
Definition ActorDocument.h:17
Definition ActorDocument.h:18
Definition ActorDocument.h:18
Definition ActorDocument.h:18
Definition ActorDocument.h:18
Definition ActorDocument.h:18
Definition ActorDefinitions.h:15
Definition ActorDocument.h:18
Definition ReflectionCtx.h:11