110 TextFile versionFile(
"$ISISROOT/isis_version.txt");
111 QString line1, line2, line3, line4;
117 QRegExp validPartOfLine(
"[^ #]*");
118 if (validPartOfLine.indexIn(line1) != -1) {
119 line1 = validPartOfLine.cap();
122 IString msg =
"$ISISROOT/isis_version.txt line 1, no valid text found";
123 throw IException(IException::Programmer, msg, _FILEINFO_);
126 if (validPartOfLine.indexIn(line2) != -1) {
127 line2 = validPartOfLine.cap();
130 IString msg =
"$ISISROOT/isis_version.txt line 2, no valid text found";
131 throw IException(IException::Programmer, msg, _FILEINFO_);
134 if (validPartOfLine.indexIn(line4) != -1) {
135 line4 = validPartOfLine.cap();
138 IString msg =
"$ISISROOT/isis_version.txt line 4, no valid text found";
139 throw IException(IException::Programmer, msg, _FILEINFO_);
142 return line1 +
" " + line4 +
" | " + line2;
Provides access to sequential ASCII stream I/O.
bool GetLine(QString &line, const bool skipComments=true)
Gets next line from file.