Changeset 3041 in ntrip


Ignore:
Timestamp:
Feb 25, 2011, 2:17:45 PM (11 years ago)
Author:
mervart
Message:
 
Location:
trunk/BNS
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNS/bns.cpp

    r2855 r3041  
    113113  // Log File
    114114  // --------
     115  _append = Qt::CheckState(settings.value("fileAppend").toInt()) == Qt::Checked;
     116
    115117  QIODevice::OpenMode oMode;
    116   if (Qt::CheckState(settings.value("fileAppend").toInt()) == Qt::Checked) {
     118  if (_append) {
    117119    oMode = QIODevice::WriteOnly | QIODevice::Unbuffered | QIODevice::Append;
    118120  }
     
    652654    }
    653655    if (_sp3) {
    654       _sp3->write(GPSweek, GPSweeks, prn, xx);
     656      _sp3->write(GPSweek, GPSweeks, prn, xx, _append);
    655657    }
    656658  }
  • trunk/BNS/bns.h

    r2767 r3041  
    9191  bnsSP3*                   _sp3;
    9292  QByteArray                _clkLine;
     93  bool                      _append;
    9394 
    9495  int    _GPSweek;
  • trunk/BNS/bnsoutf.cpp

    r2461 r3041  
    137137////////////////////////////////////////////////////////////////////////////
    138138t_irc bnsoutf::write(int GPSweek, double GPSweeks, const QString&,
    139                      const ColumnVector&) {
     139                     const ColumnVector&, bool append) {
    140140
    141141  if (_sampl != 0 && fmod(GPSweeks, _sampl) != 0.0) {
     
    158158    _out.setf(ios::showpoint | ios::fixed);
    159159    bnsSettings settings;
    160     if (QFile::exists(_fName) &&
    161         Qt::CheckState(settings.value("fileAppend").toInt()) == Qt::Checked) {
     160    if (append && QFile::exists(_fName)) {
    162161      _out.open(_fName.data(), ios::out | ios::app);
    163162    }
  • trunk/BNS/bnsoutf.h

    r860 r3041  
    1515
    1616  virtual t_irc write(int GPSweek, double GPSweeks, const QString& prn,
    17                       const ColumnVector& xx);
     17                      const ColumnVector& xx, bool append);
    1818
    1919 protected:
  • trunk/BNS/bnsrinex.cpp

    r859 r3041  
    2020
    2121#include "bnsrinex.h"
     22#include "bnssettings.h"
    2223
    2324using namespace std;
     
    2829               const QString& intr, int sampl)
    2930  : bnsoutf(prep, ext, path, intr, sampl) {
     31  bnsSettings settings;
     32  _append = Qt::CheckState(settings.value("fileAppend").toInt()) == Qt::Checked;
    3033}
    3134
     
    4043                   const ColumnVector& xx) {
    4144
    42   if (bnsoutf::write(GPSweek, GPSweeks, prn, xx) == success) {
     45  if (bnsoutf::write(GPSweek, GPSweeks, prn, xx, _append) == success) {
    4346
    4447      QDateTime datTim = dateAndTimeFromGPSweek(GPSweek, GPSweeks);
  • trunk/BNS/bnsrinex.h

    r854 r3041  
    1818 private:
    1919  virtual void writeHeader(const QDateTime& datTim);
     20  bool _append;
    2021};
    2122
  • trunk/BNS/bnssp3.cpp

    r860 r3041  
    4242////////////////////////////////////////////////////////////////////////////
    4343t_irc bnsSP3::write(int GPSweek, double GPSweeks, const QString& prn,
    44                    const ColumnVector& xx) {
     44                    const ColumnVector& xx, bool append) {
    4545
    46   if ( bnsoutf::write(GPSweek, GPSweeks, prn, xx) == success) {
     46  if ( bnsoutf::write(GPSweek, GPSweeks, prn, xx, append) == success) {
    4747
    4848    if (_lastGPSweek != GPSweek || _lastGPSweeks != GPSweeks) {
  • trunk/BNS/bnssp3.h

    r859 r3041  
    1414  virtual ~bnsSP3();
    1515  virtual t_irc write(int GPSweek, double GPSweeks, const QString& prn,
    16                       const ColumnVector& xx);
     16                      const ColumnVector& xx, bool append);
    1717
    1818 private:
Note: See TracChangeset for help on using the changeset viewer.