void AMExporterGeneralAscii::writeHeader() { if(!option_->headerIncluded()) return; QString headerText = parseKeywordString(option_->headerText()); normalizeLineEndings(headerText); if(headerText.right(1) != "\n") headerText.append("\n"); // ensure ends in newline convertNormalizedLineEndingsTo(option_->newlineDelimiter(), headerText); QTextStream ts(file_); ts << headerText; }
void AMExporterAthena::writeHeader() { if(!option_->headerIncluded()) return; QString headerText = parseKeywordString(option_->headerText()); headerText.prepend("# "); normalizeLineEndings(headerText); if(headerText.right(1) != "\n") headerText.append("\n"); // ensure ends in newline convertNormalizedLineEndingsTo(option_->newlineDelimiter(), headerText); headerText.replace("\n", "\n# "); headerText.append("-------------------------------------\n"); // Athena header delimeter from the data. QTextStream ts(file_); ts << headerText; }