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

Method BeginArray

source/common/engine/serializer.cpp:386–417  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

384//==========================================================================
385
386bool FSerializer::BeginArray(const char *name)
387{
388 if (isWriting())
389 {
390 WriteKey(name);
391 w->StartArray();
392 w->mInObject.Push(false);
393 }
394 else
395 {
396 auto val = r->FindKey(name);
397 if (val != nullptr)
398 {
399 assert(val->IsArray());
400 if (val->IsArray())
401 {
402 r->mObjects.Push(FJSONObject(val));
403 }
404 else
405 {
406 Printf(TEXTCOLOR_RED "Array expected for '%s'\n", name);
407 mErrors++;
408 return false;
409 }
410 }
411 else
412 {
413 return false;
414 }
415 }
416 return true;
417}
418
419//==========================================================================
420//

Callers 9

SerializeEventsFunction · 0.45
S_SerializeSoundsFunction · 0.45
GetGamesFunction · 0.45
StaticWriteRNGStateMethod · 0.45
StaticReadRNGStateMethod · 0.45
serializer.hFile · 0.45
WriteValueMethod · 0.45
ReadValueMethod · 0.45

Calls 7

WriteKeyFunction · 0.85
FJSONObjectClass · 0.85
PrintfFunction · 0.85
StartArrayMethod · 0.80
IsArrayMethod · 0.80
PushMethod · 0.45
FindKeyMethod · 0.45

Tested by

no test coverage detected