MCPcopy Create free account
hub / github.com/WolfireGames/overgrowth / WriteScriptParamsToXML

Function WriteScriptParamsToXML

Source/Scripting/scriptparams.cpp:349–357  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

347}
348
349void WriteScriptParamsToXML(const ScriptParamMap &pm, TiXmlElement *params) {
350 for (const auto &iter : pm) {
351 TiXmlElement *param = new TiXmlElement("parameter");
352 param->SetAttribute("name", iter.first.c_str());
353 const ScriptParam &sp = iter.second;
354 sp.WriteToXML(param);
355 params->LinkEndChild(param);
356 }
357}
358
359void ReadScriptParametersFromRAM(ScriptParamMap &spm, const std::vector<char> &data) {
360 int index = 0;

Callers 2

SaveLevelMethod · 0.85
SaveToXMLMethod · 0.85

Calls 4

WriteToXMLMethod · 0.80
LinkEndChildMethod · 0.80
SetAttributeMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected