MCPcopy Create free account
hub / github.com/FlaxEngine/FlaxEngine / Deserialize

Method Deserialize

Source/Engine/Serialization/Serialization.cpp:77–97  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

75}
76
77void Serialization::Deserialize(ISerializable::DeserializeStream& stream, VariantType& v, ISerializeModifier* modifier)
78{
79 if (stream.IsObject())
80 {
81 const auto mType = SERIALIZE_FIND_MEMBER(stream, "Type");
82 if (mType != stream.MemberEnd())
83 v.Type = (VariantType::Types)mType->value.GetInt();
84 else
85 v.Type = VariantType::Null;
86 const auto mTypeName = SERIALIZE_FIND_MEMBER(stream, "TypeName");
87 if (mTypeName != stream.MemberEnd() && mTypeName->value.IsString())
88 {
89 v.SetTypeName(StringAnsiView(mTypeName->value.GetStringAnsiView()));
90 v.Inline();
91 }
92 }
93 else
94 {
95 v.Type = (VariantType::Types)stream.GetInt();
96 }
97}
98
99bool Serialization::ShouldSerialize(const Variant& v, const void* otherObj)
100{

Callers 2

DeserializeFunction · 0.45
LoadFromBytesMethod · 0.45

Calls 15

FindObjectFunction · 0.85
LoadAssetFunction · 0.85
ParseHexFunction · 0.85
MemberEndMethod · 0.80
GetIntMethod · 0.80
SetTypeNameMethod · 0.80
InlineMethod · 0.80
GetFloatMethod · 0.80
SetStringMethod · 0.80
SetBlobMethod · 0.80
SetTypenameMethod · 0.80
SetManagedObjectMethod · 0.80

Tested by

no test coverage detected