| 432 | } |
| 433 | |
| 434 | void Preference::deMixResMapping(const ElementPtr &rootXML) { |
| 435 | if (!rootXML || this->_resMixedMapping.empty()) |
| 436 | return; |
| 437 | std::string stringOfResourceID = rootXML->getResourceID(); |
| 438 | if (!stringOfResourceID.empty()) { |
| 439 | auto iterator = this->_resMixedMapping.find(stringOfResourceID); |
| 440 | if (iterator != this->_resMixedMapping.end()) { |
| 441 | rootXML->reSetResourceID((*iterator).second); |
| 442 | BDLOG("de-mixed %s as %s", stringOfResourceID.c_str(), (*iterator).second.c_str()); |
| 443 | } |
| 444 | } |
| 445 | |
| 446 | for (const auto &child: rootXML->getChildren()) { |
| 447 | deMixResMapping(child); |
| 448 | } |
| 449 | } |
| 450 | |
| 451 | void Preference::loadMixResMapping(const std::string &resourceMappingPath) { |
| 452 | BLOG("loading resource mapping : %s", resourceMappingPath.c_str()); |
no test coverage detected