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

Function DictionaryToString

source/common/engine/serializer.cpp:1561–1580  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1559//==========================================================================
1560
1561FString DictionaryToString(const Dictionary &dict)
1562{
1563 Dictionary::ConstPair *pair;
1564 Dictionary::ConstIterator i { dict.Map };
1565
1566 rapidjson::StringBuffer buffer;
1567 rapidjson::Writer<rapidjson::StringBuffer> writer(buffer);
1568 writer.StartObject();
1569
1570 while (i.NextPair(pair))
1571 {
1572 writer.Key(pair->Key.GetChars());
1573 writer.String(pair->Value.GetChars());
1574 }
1575
1576 writer.EndObject();
1577
1578 FString contents { buffer.GetString(), buffer.GetSize() };
1579 return contents;
1580}
1581
1582Dictionary *DictionaryFromString(const FString &string)
1583{

Callers 2

serializer.cppFile · 0.85
DictToStringFunction · 0.85

Calls 8

StartObjectMethod · 0.80
KeyMethod · 0.80
StringMethod · 0.80
NextPairMethod · 0.45
GetCharsMethod · 0.45
EndObjectMethod · 0.45
GetStringMethod · 0.45
GetSizeMethod · 0.45

Tested by

no test coverage detected