| 38 | // * * * * * * * * * * * Protected Member Functions * * * * * * * * * * * * // |
| 39 | |
| 40 | bool Foam::fileFormats::STARCDCore::readHeader |
| 41 | ( |
| 42 | IFstream& is, |
| 43 | const word& signature |
| 44 | ) |
| 45 | { |
| 46 | if (!is.good()) |
| 47 | { |
| 48 | FatalErrorInFunction |
| 49 | << abort(FatalError); |
| 50 | } |
| 51 | |
| 52 | word header; |
| 53 | label majorVersion; |
| 54 | |
| 55 | string line; |
| 56 | |
| 57 | is.getLine(line); |
| 58 | IStringStream(line)() >> header; |
| 59 | |
| 60 | is.getLine(line); |
| 61 | IStringStream(line)() >> majorVersion; |
| 62 | |
| 63 | // add other checks ... |
| 64 | if (header != signature) |
| 65 | { |
| 66 | Info<< "header mismatch " << signature << " " << is.name() |
| 67 | << endl; |
| 68 | } |
| 69 | |
| 70 | return true; |
| 71 | } |
| 72 | |
| 73 | |
| 74 | void Foam::fileFormats::STARCDCore::writeHeader |
no test coverage detected