| 636 | //========================================================================== |
| 637 | |
| 638 | void 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 | // |
nothing calls this directly
no test coverage detected