LeviLamina
Loading...
Searching...
No Matches
BasicSchema.h
1#pragma once
2
3#include "mc/_HeaderOutputPredefine.h"
4
5// auto generated inclusion list
6#include "mc/deps/cereal/ContextArea.h"
7#include "mc/deps/cereal/schema/SerializationTraits.h"
8#include "mc/deps/cereal/schema/VariantPriorityLevel.h"
9#include "mc/external/cereal/StringViewHash.h"
10#include "mc/platform/brstd/flat_set.h"
11
12// auto generated forward declare list
13// clang-format off
14namespace cereal { class Constraint; }
15namespace cereal { struct DescriptionConfig; }
16namespace cereal { struct MetaVisitor; }
17namespace cereal { struct SchemaDescription; }
18namespace cereal { struct SchemaReader; }
19namespace cereal { struct SchemaWriter; }
20namespace cereal::internal { struct LoadState; }
21namespace cereal::internal { struct OverrideState; }
22namespace cereal::internal { struct ReflectionContext; }
23namespace cereal::internal { struct SaveState; }
24// clang-format on
25
26namespace cereal::internal {
27
29public:
30 // BasicSchema inner types declare
31 // clang-format off
32 struct EnumMapping;
33 struct GetterDescriptor;
34 struct MemberDescriptor;
35 struct MemberFamily;
36 struct SetterDescriptor;
38 struct TypeDescriptor;
39 // clang-format on
40
41 // BasicSchema inner types define
42 struct EnumMapping {
43 public:
44 // EnumMapping inner types declare
45 // clang-format off
46 struct EnumValue;
47 struct View;
48 // clang-format on
49
50 // EnumMapping inner types define
51 struct EnumValue {
52 public:
53 // member variables
54 // NOLINTBEGIN
55 ::ll::TypedStorage<1, 1, bool> mIsDeprecated;
56 // NOLINTEND
57 };
58
59 struct View {
60 public:
61 // member variables
62 // NOLINTBEGIN
63 ::ll::TypedStorage<4, 4, uint> mScope;
64 ::ll::
65 TypedStorage<8, 64, ::std::unordered_map<uint, ::cereal::internal::BasicSchema::EnumMapping::EnumValue>>
66 mValues;
67 ::ll::TypedStorage<4, 8, ::std::optional<uint>> mParent;
68 // NOLINTEND
69 };
70
71 public:
72 // member variables
73 // NOLINTBEGIN
74 ::ll::TypedStorage<8, 24, ::std::vector<::cereal::internal::BasicSchema::EnumMapping::View>> mViews;
75 // NOLINTEND
76 };
77
79 public:
80 // member variables
81 // NOLINTBEGIN
82 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::cereal::internal::BasicSchema>> mPtr;
83 ::ll::TypedStorage<1, 1, ::cereal::ContextArea> mAllowedAreas;
84 // NOLINTEND
85 };
86
88 public:
89 // member variables
90 // NOLINTBEGIN
91 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::cereal::internal::BasicSchema>> mPtr;
92 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::cereal::Constraint>> mConstraint;
93 ::ll::TypedStorage<8, 32, ::std::string> mNameExt;
94 ::ll::TypedStorage<8, 32, ::std::string> mName;
95 ::ll::TypedStorage<
96 8,
97 72,
98 ::entt::dense_map<
99 ::std::string,
100 ::std::pair<::entt::meta_type (*)(::entt::meta_ctx const&), ::entt::basic_any<16, 8>>,
102 ::std::equal_to<void>>>
103 mUserPropertiesMap;
104 ::ll::TypedStorage<
105 8,
106 24,
109 ::std::less<void>,
110 ::std::vector<::cereal::internal::OverrideState>>>
111 mOverridingTypes;
112 ::ll::TypedStorage<8, 32, ::std::string> mErrorMessage;
113 ::ll::TypedStorage<1, 1, ::cereal::SerializationTraits> mSerializationTraits;
114 ::ll::TypedStorage<1, 1, ::cereal::ContextArea> mAllowedAreas;
115 ::ll::TypedStorage<4, 8, ::std::optional<uint>> mScope;
116 ::ll::TypedStorage<1, 1, bool> mIsDeprecatedComponent;
117 // NOLINTEND
118
119 public:
120 // member functions
121 // NOLINTBEGIN
122 MCAPI ~MemberDescriptor();
123 // NOLINTEND
124
125 public:
126 // destructor thunk
127 // NOLINTBEGIN
128 MCAPI void $dtor();
129 // NOLINTEND
130 };
131
133 public:
134 // member variables
135 // NOLINTBEGIN
136 ::ll::TypedStorage<8, 16, ::std::string_view> mPrefix;
137 ::ll::TypedStorage<8, 40, ::std::basic_regex<char, ::std::regex_traits<char>>> mRegex;
138 ::ll::TypedStorage<4, 4, uint> mMemberId;
139 // NOLINTEND
140 };
141
143 public:
144 // member variables
145 // NOLINTBEGIN
146 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::cereal::internal::BasicSchema>> mPtr;
147 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::cereal::Constraint>> mConstraint;
148 ::ll::TypedStorage<1, 1, ::cereal::ContextArea> mAllowedAreas;
149 // NOLINTEND
150 };
151
153 public:
154 // member variables
155 // NOLINTBEGIN
156 ::ll::TypedStorage<8, 8, ::entt::meta_type (*)(::entt::meta_ctx const&)> mResolve;
157 ::ll::TypedStorage<8, 32, ::std::string> mTaggedName;
158 // NOLINTEND
159 };
160
162 public:
163 // member variables
164 // NOLINTBEGIN
165 ::ll::TypedStorage<8, 8, ::std::unique_ptr<::cereal::internal::BasicSchema>> mPtr;
166 ::ll::TypedStorage<8, 32, ::std::string> mName;
167 ::ll::TypedStorage<8, 24, ::cereal::internal::BasicSchema::EnumMapping> mEnumMapping;
168 ::ll::TypedStorage<
169 8,
170 72,
171 ::entt::dense_map<
172 ::std::string,
173 ::std::pair<::entt::meta_type (*)(::entt::meta_ctx const&), ::entt::basic_any<16, 8>>,
175 ::std::equal_to<void>>>
176 mUserPropertiesMap;
177 ::ll::TypedStorage<8, 24, ::std::vector<::cereal::internal::BasicSchema::MemberFamily>> mMemberFamilies;
178 ::ll::TypedStorage<8, 32, ::std::string> mErrorMessage;
179 // NOLINTEND
180
181 public:
182 // member functions
183 // NOLINTBEGIN
184 MCAPI ~TypeDescriptor();
185 // NOLINTEND
186
187 public:
188 // destructor thunk
189 // NOLINTBEGIN
190 MCAPI void $dtor();
191 // NOLINTEND
192 };
193
194 using IdType = uint;
195
196 using OverridingSet = ::brstd::flat_set<
198 ::std::less<void>,
199 ::std::vector<::cereal::internal::OverrideState>>;
200
201public:
202 // virtual functions
203 // NOLINTBEGIN
204 virtual ~BasicSchema() = default;
205
206 virtual bool isGreedy(::entt::meta_ctx const& ctx) const;
207
208 virtual ::cereal::internal::VariantPriorityLevel minVariantPriorityLevel(::entt::meta_ctx const& ctx) const;
209
210 virtual bool doMap(::entt::meta_any& src, ::entt::meta_any& dst, ::cereal::MetaVisitor& visitor) const;
211
212 virtual ::cereal::internal::BasicSchema const& doUnwrap(::entt::meta_any& elem, bool fillIfEmpty) const;
213
214 virtual void doLoad(
216 ::entt::meta_any& any,
217 ::entt::meta_any const& udata,
219 ) const;
220
221 virtual void doSave(
223 ::entt::meta_any const& any,
225 ) const;
226
227 virtual ::cereal::SchemaDescription
228 makeDescription(::cereal::internal::ReflectionContext const& ctx, ::cereal::DescriptionConfig config) const = 0;
229 // NOLINTEND
230
231public:
232 // member functions
233 // NOLINTBEGIN
234 MCAPI void load(
236 ::entt::meta_any& any,
237 ::entt::meta_any const& udata,
239 ) const;
240
241 MCAPI bool
242 map(::cereal::internal::BasicSchema const& schema,
243 ::entt::meta_any& src,
244 ::entt::meta_any& dst,
245 ::cereal::MetaVisitor& visitor) const;
246 // NOLINTEND
247
248public:
249 // virtual function thunks
250 // NOLINTBEGIN
251 MCFOLD bool $isGreedy(::entt::meta_ctx const& ctx) const;
252
253 MCFOLD ::cereal::internal::VariantPriorityLevel $minVariantPriorityLevel(::entt::meta_ctx const& ctx) const;
254
255 MCFOLD bool $doMap(::entt::meta_any& src, ::entt::meta_any& dst, ::cereal::MetaVisitor& visitor) const;
256
257 MCFOLD ::cereal::internal::BasicSchema const& $doUnwrap(::entt::meta_any& elem, bool fillIfEmpty) const;
258
259
260 // NOLINTEND
261};
262
263} // namespace cereal::internal
Definition flat_set.h:10
Definition Constraint.h:17
Definition BasicSchema.h:28
Definition DescriptionConfig.h:12
Definition MetaVisitor.h:15
Definition SchemaDescription.h:21
Definition SchemaReader.h:12
Definition SchemaWriter.h:16
Definition LoadState.h:14
Definition OverrideState.h:10
Definition ReflectionContext.h:10
Definition SaveState.h:13
Definition StringViewHash.h:7
Definition ctx.h:5