| 295 | } |
| 296 | |
| 297 | void AnalyzerInformation::reopen(const std::string &buildDir, const std::string &sourcefile, const std::string &cfg, std::size_t fsFileId) |
| 298 | { |
| 299 | if (buildDir.empty() || sourcefile.empty()) |
| 300 | return; |
| 301 | |
| 302 | const std::string analyzerInfoFile = AnalyzerInformation::getAnalyzerInfoFile(buildDir,sourcefile,cfg,fsFileId); |
| 303 | std::ifstream ifs(analyzerInfoFile); |
| 304 | if (!ifs.is_open()) |
| 305 | return; |
| 306 | |
| 307 | std::ostringstream iss; |
| 308 | iss << ifs.rdbuf(); |
| 309 | ifs.close(); |
| 310 | |
| 311 | std::string content = iss.str(); |
| 312 | content.resize(content.find("</analyzerinfo>")); |
| 313 | |
| 314 | mOutputStream.open(analyzerInfoFile, std::ios::trunc); |
| 315 | mOutputStream << content; |
| 316 | } |