MCPcopy Create free account
hub / github.com/Samsung/UTopia / genModifiedSrcs

Method genModifiedSrcs

lib/generation/UTModify.cpp:430–450  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

428}
429
430void UTModify::genModifiedSrcs(const std::string &OrgSrcDir,
431 const std::string &OutDir,
432 const std::string &Signature) const {
433 for (auto Iter : FileReplaceMap) {
434 auto FilePath = Iter.first;
435 assert(!FilePath.empty() && "Unexpected Program State");
436 auto Replacements = Iter.second;
437
438 auto OutPath = util::rebasePath(FilePath, OrgSrcDir, OutDir);
439 applyReplacements(FilePath, OutPath, Replacements, Signature);
440 }
441
442 for (auto Iter : FileNewMap) {
443 auto FilePath = Iter.first;
444 assert(!FilePath.empty() && "Unexpected Program State");
445 auto Content = Signature + Iter.second;
446
447 auto OutPath = util::rebasePath(FilePath, OrgSrcDir, OutDir);
448 util::saveFile(OutPath.c_str(), Content.c_str());
449 }
450}
451
452void UTModify::applyReplacements(
453 const std::string &OrgFilePath, const std::string &OutFilePath,

Callers 1

generateMethod · 0.80

Calls 3

rebasePathFunction · 0.85
saveFileFunction · 0.85
emptyMethod · 0.80

Tested by

no test coverage detected