Changeset 3382 in ntrip for trunk/BNC/bncpppclient.h
- Timestamp:
- Aug 28, 2011, 6:08:33 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/bncpppclient.h
r3377 r3382 66 66 t_epoData() {} 67 67 68 t_epoData(const t_epoData& ed) { 69 tt = ed.tt; 70 QMapIterator<QString, t_satData*> itGPS(ed.satDataGPS); 68 ~t_epoData() { 69 clear(); 70 } 71 72 void clear() { 73 QMapIterator<QString, t_satData*> itGPS(satDataGPS); 74 while (itGPS.hasNext()) { 75 itGPS.next(); 76 delete itGPS.value(); 77 } 78 satDataGPS.clear(); 79 QMapIterator<QString, t_satData*> itGlo(satDataGlo); 80 while (itGlo.hasNext()) { 81 itGlo.next(); 82 delete itGlo.value(); 83 } 84 satDataGlo.clear(); 85 QMapIterator<QString, t_satData*> itGal(satDataGal); 86 while (itGal.hasNext()) { 87 itGal.next(); 88 delete itGal.value(); 89 } 90 satDataGal.clear(); 91 } 92 93 void deepCopy(const t_epoData* from) { 94 clear(); 95 tt = from->tt; 96 QMapIterator<QString, t_satData*> itGPS(from->satDataGPS); 71 97 while (itGPS.hasNext()) { 72 98 itGPS.next(); 73 99 satDataGPS[itGPS.key()] = new t_satData(*itGPS.value()); 74 100 } 75 QMapIterator<QString, t_satData*> itGlo( ed.satDataGlo);101 QMapIterator<QString, t_satData*> itGlo(from->satDataGlo); 76 102 while (itGlo.hasNext()) { 77 103 itGlo.next(); 78 104 satDataGlo[itGlo.key()] = new t_satData(*itGlo.value()); 79 105 } 80 QMapIterator<QString, t_satData*> itGal( ed.satDataGal);106 QMapIterator<QString, t_satData*> itGal(from->satDataGal); 81 107 while (itGal.hasNext()) { 82 108 itGal.next(); … … 85 111 } 86 112 87 ~t_epoData() {88 QMapIterator<QString, t_satData*> itGPS(satDataGPS);89 while (itGPS.hasNext()) {90 itGPS.next();91 delete itGPS.value();92 }93 QMapIterator<QString, t_satData*> itGlo(satDataGlo);94 while (itGlo.hasNext()) {95 itGlo.next();96 delete itGlo.value();97 }98 QMapIterator<QString, t_satData*> itGal(satDataGal);99 while (itGal.hasNext()) {100 itGal.next();101 delete itGal.value();102 }103 }104 113 unsigned sizeGPS() const {return satDataGPS.size();} 105 114 unsigned sizeGlo() const {return satDataGlo.size();}
Note:
See TracChangeset
for help on using the changeset viewer.