Changeset 5846 in ntrip
- Timestamp:
- Aug 7, 2014, 10:43:33 AM (10 years ago)
- Location:
- trunk/BNC/src
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/bnccore.cpp
r5738 r5846 119 119 _corrs = new QMultiMap<bncTime, QString>; 120 120 121 _ currentDateAndTimeGPS = 0;121 _dateAndTimeGPS = 0; 122 122 123 123 for (int ii = 0; ii < PRN_GLONASS_NUM; ++ii) { … … 157 157 delete _corrs; 158 158 159 delete _ currentDateAndTimeGPS;159 delete _dateAndTimeGPS; 160 160 161 161 delete _rawFile; … … 835 835 } 836 836 837 838 // 839 //////////////////////////////////////////////////////////////////////////// 840 bool t_bncCore::dateAndTimeGPSSet() const { 841 QMutexLocker locker(&_mutexDateAndTimeGPS); 842 if (_dateAndTimeGPS) { 843 return true; 844 } 845 else { 846 return false; 847 } 848 } 849 850 // 851 //////////////////////////////////////////////////////////////////////////// 852 QDateTime t_bncCore::dateAndTimeGPS() const { 853 QMutexLocker locker(&_mutexDateAndTimeGPS); 854 if (_dateAndTimeGPS) { 855 return *_dateAndTimeGPS; 856 } 857 else { 858 return QDateTime(); 859 } 860 } 861 862 // 863 //////////////////////////////////////////////////////////////////////////// 864 void t_bncCore::setDateAndTimeGPS(QDateTime dateTime) { 865 QMutexLocker locker(&_mutexDateAndTimeGPS); 866 delete _dateAndTimeGPS; 867 _dateAndTimeGPS = new QDateTime(dateTime); 868 } -
trunk/BNC/src/bnccore.h
r5732 r5846 53 53 void setCaster(bncCaster* caster) {_caster = caster;} 54 54 const bncCaster* caster() const {return _caster;} 55 QDateTime* _currentDateAndTimeGPS; 55 bool dateAndTimeGPSSet() const; 56 QDateTime dateAndTimeGPS() const; 57 void setDateAndTimeGPS(QDateTime dateTime); 56 58 void setConfFileName(const QString& confFileName); 57 59 QString confFileName() const {return _confFileName;} … … 140 142 QWidget* _mainWindow; 141 143 bool _GUIenabled; 144 QDateTime* _dateAndTimeGPS; 145 mutable QMutex _mutexDateAndTimeGPS; 142 146 public: 143 147 bncPPPclient* _bncPPPclient; -
trunk/BNC/src/bncrawfile.cpp
r5070 r5846 136 136 QStringList lst = line.split(' '); 137 137 138 delete BNC_CORE->_currentDateAndTimeGPS; 139 BNC_CORE->_currentDateAndTimeGPS = 140 new QDateTime(QDateTime::fromString(lst.value(0), Qt::ISODate)); 138 BNC_CORE->setDateAndTimeGPS(QDateTime(QDateTime::fromString(lst.value(0), Qt::ISODate))); 141 139 142 140 _staID = lst.value(1).toAscii(); -
trunk/BNC/src/bncutils.cpp
r5807 r5846 93 93 QDateTime currDateTimeGPS; 94 94 95 if ( BNC_CORE-> _currentDateAndTimeGPS) {96 currDateTimeGPS = *(BNC_CORE->_currentDateAndTimeGPS);95 if ( BNC_CORE->dateAndTimeGPSSet() ) { 96 currDateTimeGPS = BNC_CORE->dateAndTimeGPS(); 97 97 } 98 98 else { … … 118 118 //////////////////////////////////////////////////////////////////////////// 119 119 QDateTime currentDateAndTimeGPS() { 120 if ( BNC_CORE-> _currentDateAndTimeGPS) {121 return *(BNC_CORE->_currentDateAndTimeGPS);120 if ( BNC_CORE->dateAndTimeGPSSet() ) { 121 return BNC_CORE->dateAndTimeGPS(); 122 122 } 123 123 else {
Note:
See TracChangeset
for help on using the changeset viewer.