void SP3Stream :: init(std::ios::openmode mode) { header = SP3Header(); warnings.clear(); // for close() later wroteEOF = writingMode = false; if( (mode & std::ios::out) && !(mode & std::ios::in) ) writingMode = true; }
/// override open() to reset the header /// @param filename the name of the ASCII SP3 format file to be opened /// @param mode the ios::openmode to be used virtual void open(const char* filename, std::ios::openmode mode) { FFTextStream::open(filename, mode); header = SP3Header(); warnings.clear(); // for close() later wroteEOF = writingMode = false; if( (mode & std::ios::out) && !(mode & std::ios::in) ) writingMode = true; // this is necessary in order for SP3Data::reallyGetRecord() to // process the last line in the file when there is no EOF record...why? if(mode & std::ios::in) exceptions(std::ifstream::failbit); }