Changeset 426 in ntrip
- Timestamp:
- Mar 28, 2007, 3:21:19 PM (18 years ago)
- Location:
- trunk/BNC
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/bnczerodecoder.cpp
r424 r426 43 43 _fileName = path + fileName; 44 44 45 _out.open(_fileName.toAscii().data());45 reopen(); 46 46 } 47 47 … … 52 52 } 53 53 54 // Reopen Output File 55 //////////////////////////////////////////////////////////////////////// 56 void bncZeroDecoder::reopen() { 57 QDate currDate = QDate::currentDate(); 58 if (!_fileDate.isValid() || _fileDate != currDate) { 59 _out.close(); 60 _out.open( (_fileName + "_" + currDate.toString("yyMMdd")).toAscii().data()); 61 _fileDate = currDate; 62 } 63 } 64 54 65 // Decode Method 55 66 //////////////////////////////////////////////////////////////////////// 56 67 void bncZeroDecoder::Decode(char* buffer, int bufLen) { 68 reopen(); 57 69 _out.write(buffer, bufLen); 58 70 _out.flush(); -
trunk/BNC/bnczerodecoder.h
r424 r426 37 37 virtual void Decode(char* buffer, int bufLen); 38 38 private: 39 void reopen(); 39 40 QString _fileName; 40 41 std::ofstream _out; 42 QDate _fileDate; 41 43 }; 42 44
Note:
See TracChangeset
for help on using the changeset viewer.