MCPcopy Create free account
hub / github.com/ZDoom/Raze / WriteObjects

Method WriteObjects

source/common/engine/serializer.cpp:638–661  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

636//==========================================================================
637
638void FSerializer::WriteObjects()
639{
640 if (isWriting() && w->mDObjects.Size())
641 {
642 BeginArray("objects");
643 // we cannot use the C++11 shorthand syntax here because the array may grow while being processed.
644 for (unsigned i = 0; i < w->mDObjects.Size(); i++)
645 {
646 auto obj = w->mDObjects[i];
647
648 if(obj->ObjectFlags & OF_Transient) continue;
649
650 BeginObject(nullptr);
651 w->Key("classtype");
652 w->String(obj->GetClass()->TypeName.GetChars());
653
654 obj->SerializeUserVars(*this);
655 obj->Serialize(*this);
656 obj->CheckIfSerialized();
657 EndObject();
658 }
659 EndArray();
660 }
661}
662
663//==========================================================================
664//

Callers

nothing calls this directly

Calls 8

KeyMethod · 0.80
StringMethod · 0.80
GetClassMethod · 0.80
SerializeUserVarsMethod · 0.80
CheckIfSerializedMethod · 0.80
SizeMethod · 0.45
GetCharsMethod · 0.45
SerializeMethod · 0.45

Tested by

no test coverage detected