Changeset 3035 in ntrip for trunk/BNC/RTCM3/RTCM3coDecoder.cpp


Ignore:
Timestamp:
Feb 25, 2011, 1:35:15 PM (13 years ago)
Author:
mervart
Message:
 
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/RTCM3/RTCM3coDecoder.cpp

    r3024 r3035  
    8585// Reopen Output File
    8686////////////////////////////////////////////////////////////////////////
    87 void RTCM3coDecoder::reopen() {
    88 
    89   if (!_fileNameSkl.isEmpty()) {
     87void RTCM3coDecoder::reopen(const QString& fileNameSkl, QString& fileName,
     88                            ofstream*& out) {
     89
     90  if (!fileNameSkl.isEmpty()) {
    9091
    9192    bncSettings settings;
     
    9697                                      settings.value("corrIntr").toString());
    9798
    98     QString fileName = _fileNameSkl
     99    QString fileNameHlp = fileNameSkl
    99100      + QString("%1").arg(datTim.date().dayOfYear(), 3, 10, QChar('0'))
    100101      + hlpStr + datTim.toString(".yyC");
    101102
    102     if (_fileName == fileName) {
     103    if (fileName == fileNameHlp) {
    103104      return;
    104105    }
    105106    else {
    106       _fileName = fileName;
    107     }
    108 
    109     delete _out;
     107      fileName = fileNameHlp;
     108    }
     109
     110    delete out;
    110111    if ( Qt::CheckState(settings.value("rnxAppend").toInt()) == Qt::Checked) {
    111       _out = new ofstream( _fileName.toAscii().data(),
     112      out = new ofstream( fileName.toAscii().data(),
    112113                           ios_base::out | ios_base::app );
    113114    }
    114115    else {
    115       _out = new ofstream( _fileName.toAscii().data() );
     116      out = new ofstream( fileName.toAscii().data() );
    116117    }
    117118  }
     
    154155           (_co.NumberOfGPSSat > 0 || _co.NumberOfGLONASSSat > 0) ) {
    155156
    156         reopen();
     157        reopen(_fileNameSkl, _fileName, _out);
    157158
    158159        // Guess GPS week and sec using system time
Note: See TracChangeset for help on using the changeset viewer.