MCPcopy Create free account
hub / github.com/OpenCppCoverage/OpenCppCoverage / ExportFile

Method ExportFile

Exporter/Html/HtmlExporter.cpp:153–170  ·  view source on GitHub ↗

---------------------------------------------------------------------

Source from the content-addressed store, hash-verified

151
152 //---------------------------------------------------------------------
153 boost::optional<fs::path> HtmlExporter::ExportFile(
154 const HtmlFolderStructure& htmlFolderStructure,
155 const Plugin::FileCoverage& fileCoverage) const
156 {
157 auto htmlFilePath = htmlFolderStructure.GetHtmlFilePath(fileCoverage.GetPath());
158 std::wostringstream ostr;
159
160 if (!Tools::FileExists(fileCoverage.GetPath()))
161 return boost::optional<fs::path>();
162
163 auto enableCodePrettify = fileCoverageExporter_.Export(fileCoverage, ostr);
164
165 auto title = fileCoverage.GetPath().filename().wstring();
166 exporter_.GenerateSourceTemplate(
167 title, ostr.str(), enableCodePrettify, htmlFilePath.GetAbsolutePath());
168
169 return htmlFilePath.GetRelativeLinkPath();
170 }
171}
172

Callers

nothing calls this directly

Calls 4

FileExistsFunction · 0.85
GetHtmlFilePathMethod · 0.80
ExportMethod · 0.45

Tested by

no test coverage detected