MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / readLayer

Method readLayer

Engine/source/util/settings.cpp:292–322  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

290}
291
292void Settings::readLayer(SimXMLDocument *document, String groupStack)
293{
294 for(S32 i=0; document->pushChildElement(i); i++)
295 {
296 const UTF8 *type = document->elementValue();
297 const UTF8 *name = document->attribute("name");
298 const UTF8 *value = document->getText();
299
300 if(String::compare(type, "Group") == 0)
301 {
302 String newStack = groupStack;
303
304 if(!groupStack.isEmpty())
305 newStack += "/";
306
307 newStack += name;
308 readLayer(document, newStack);
309 } else if(String::compare(type, "Setting") == 0)
310 {
311 String nameString = groupStack;
312
313 if(!groupStack.isEmpty())
314 nameString += "/";
315
316 nameString += name;
317 setDataField(StringTable->insert(nameString.c_str()), NULL, value);
318 }
319
320 document->popElement();
321 }
322}
323
324void Settings::beginGroup(const UTF8 *groupName, bool fromStart)
325{

Callers

nothing calls this directly

Calls 9

compareFunction · 0.85
pushChildElementMethod · 0.80
elementValueMethod · 0.80
popElementMethod · 0.80
attributeMethod · 0.45
getTextMethod · 0.45
isEmptyMethod · 0.45
insertMethod · 0.45
c_strMethod · 0.45

Tested by

no test coverage detected