| 290 | } |
| 291 | |
| 292 | void 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 | |
| 324 | void Settings::beginGroup(const UTF8 *groupName, bool fromStart) |
| 325 | { |
nothing calls this directly
no test coverage detected