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

Method OnGetData

Source/Engine/Localization/LocalizedStringTable.cpp:108–143  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

106}
107
108void LocalizedStringTable::OnGetData(rapidjson_flax::StringBuffer& buffer) const
109{
110 PrettyJsonWriter writerObj(buffer);
111 JsonWriter& writer = writerObj;
112 writer.StartObject();
113 {
114 writer.JKEY("Locale");
115 writer.String(Locale);
116
117 if (FallbackTable.GetID().IsValid())
118 {
119 writer.JKEY("FallbackTable");
120 writer.Guid(FallbackTable.GetID());
121 }
122
123 writer.JKEY("Entries");
124 writer.StartObject();
125 for (auto& e : Entries)
126 {
127 writer.Key(e.Key);
128 if (e.Value.Count() == 1)
129 {
130 writer.String(e.Value[0]);
131 }
132 else
133 {
134 writer.StartArray();
135 for (auto& q : e.Value)
136 writer.String(q);
137 writer.EndArray();
138 }
139 }
140 writer.EndObject();
141 }
142 writer.EndObject();
143}
144

Callers

nothing calls this directly

Calls 10

GetIDMethod · 0.80
GuidMethod · 0.80
StartObjectMethod · 0.45
StringMethod · 0.45
IsValidMethod · 0.45
KeyMethod · 0.45
CountMethod · 0.45
StartArrayMethod · 0.45
EndArrayMethod · 0.45
EndObjectMethod · 0.45

Tested by

no test coverage detected