Changeset 2882 in ntrip for trunk/BNC/bncantex.cpp
- Timestamp:
- Jan 26, 2011, 11:22:21 AM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/bncantex.cpp
r2881 r2882 53 53 //////////////////////////////////////////////////////////////////////////// 54 54 bncAntex::~bncAntex() { 55 QMapIterator<QString, t_antMap*> it(_maps); 56 while (it.hasNext()) { 57 it.next(); 58 delete it.value(); 59 } 55 60 } 56 61 57 62 // 58 63 //////////////////////////////////////////////////////////////////////////// 59 voidbncAntex::readFile(const QString& fileName) {64 t_irc bncAntex::readFile(const QString& fileName) { 60 65 61 66 QFile inFile(fileName); … … 66 71 while ( !in.atEnd() ) { 67 72 QString line = in.readLine(); 73 74 t_antMap* newMap = 0; 75 if (line.indexOf("START OF ANTENNA") == 60) { 76 if (newMap) { 77 delete newMap; 78 return failure; 79 } 80 else { 81 newMap = new t_antMap(); 82 } 83 } 68 84 85 else if (line.indexOf("END OF ANTENNA") == 60) { 86 if (newMap) { 87 _maps[newMap->antName] = newMap; 88 newMap = 0; 89 } 90 else { 91 return failure; 92 } 93 } 69 94 } 95 96 return success; 70 97 }
Note:
See TracChangeset
for help on using the changeset viewer.