Changeset 6435 in ntrip
- Timestamp:
- Dec 25, 2014, 6:50:53 PM (10 years ago)
- Location:
- trunk/BNC/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/bncephuser.cpp
r6434 r6435 105 105 // 106 106 //////////////////////////////////////////////////////////////////////////// 107 t_irc bncEphUser::putNewEph(t_eph* newEph) { 107 t_irc bncEphUser::putNewEph(const t_eph* eph) { 108 108 109 QMutexLocker locker(&_mutex); 109 110 110 t_irc irc = failure; 111 if (eph == 0) { 112 return failure; 113 } 111 114 112 if (newEph == 0) { 113 return irc; 115 const t_ephGPS* ephGPS = dynamic_cast<const t_ephGPS*>(eph); 116 const t_ephGlo* ephGlo = dynamic_cast<const t_ephGlo*>(eph); 117 const t_ephGal* ephGal = dynamic_cast<const t_ephGal*>(eph); 118 const t_ephSBAS* ephSBAS = dynamic_cast<const t_ephSBAS*>(eph); 119 const t_ephCompass* ephCompass = dynamic_cast<const t_ephCompass*>(eph); 120 121 t_eph* newEph = 0; 122 123 if (ephGPS) { 124 newEph = new t_ephGPS(*ephGPS); 125 } 126 else if (ephGlo) { 127 newEph = new t_ephGlo(*ephGlo); 128 } 129 else if (ephGal) { 130 newEph = new t_ephGal(*ephGal); 131 } 132 else if (ephSBAS) { 133 newEph = new t_ephSBAS(*ephSBAS); 134 } 135 else if (ephCompass) { 136 newEph = new t_ephCompass(*ephCompass); 137 } 138 else { 139 return failure; 114 140 } 115 141 116 142 QString prn(newEph->prn().toString().c_str()); 143 117 144 if (_eph.contains(prn)) { 118 145 if (newEph->isNewerThan(_eph.value(prn)->last)) { … … 121 148 _eph.value(prn)->last = newEph; 122 149 ephBufferChanged(); 123 irc =success;150 return success; 124 151 } 125 152 } … … 127 154 _eph.insert(prn, new t_ephPair(newEph)); 128 155 ephBufferChanged(); 129 irc =success;156 return success; 130 157 } 131 158 132 return irc;159 return failure; 133 160 } 134 161 -
trunk/BNC/src/bncephuser.h
r6432 r6435 68 68 } 69 69 70 t_irc putNewEph( t_eph* newEph);70 t_irc putNewEph(const t_eph* newEph); 71 71 72 72 public slots:
Note:
See TracChangeset
for help on using the changeset viewer.