Changeset 7640 in ntrip for trunk/BNC/src/bncmain.cpp


Ignore:
Timestamp:
Dec 18, 2015, 3:18:17 PM (8 years ago)
Author:
stuerze
Message:

some code cleanup

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/BNC/src/bncmain.cpp

    r7541 r7640  
    379379  }
    380380
     381  bncWindow*          bncWin = 0;
     382  t_reqcEdit*         reqcEdit = 0;
     383  t_reqcAnalyze*      reqcAnalyze = 0;
     384  t_sp3Comp*          sp3Comp = 0;
     385  bncEphUploadCaster* casterEph = 0;
     386  bncCaster*          caster = 0;
     387  bncRawFile*         rawFile =  0;
     388  bncGetThread*       getThread = 0;
     389
    381390  // Interactive Mode - open the main window
    382391  // ---------------------------------------
     
    395404    app.setWindowIcon(QPixmap(":ntrip-logo.png"));
    396405
    397     bncWindow* bncWin = new bncWindow();
     406    bncWin = new bncWindow();
    398407    BNC_CORE->setMainWindow(bncWin);
    399408    bncWin->show();
     
    403412  // -------------------
    404413  else if (settings.value("PPP/dataSource").toString() == "RINEX Files") {
    405     bncCaster* caster = new bncCaster();
     414    caster = new bncCaster();
    406415    BNC_CORE->setCaster(caster);
    407416    BNC_CORE->setMode(t_bncCore::batchPostProcessing);
     
    413422  else if (settings.value("reqcAction").toString() == "Edit/Concatenate") {
    414423    BNC_CORE->setMode(t_bncCore::batchPostProcessing);
    415     t_reqcEdit* reqcEdit = new t_reqcEdit(0);
     424    reqcEdit = new t_reqcEdit(0);
    416425    reqcEdit->start();
    417426  }
     
    421430  else if (settings.value("reqcAction").toString() == "Analyze") {
    422431    BNC_CORE->setMode(t_bncCore::batchPostProcessing);
    423     t_reqcAnalyze* reqcAnalyze = new t_reqcAnalyze(0);
     432    reqcAnalyze = new t_reqcAnalyze(0);
    424433    reqcAnalyze->start();
    425434  }
     
    429438  else if (!settings.value("sp3CompFile").toString().isEmpty()) {
    430439    BNC_CORE->setMode(t_bncCore::batchPostProcessing);
    431     t_sp3Comp* sp3Comp = new t_sp3Comp(0);
     440    sp3Comp = new t_sp3Comp(0);
    432441    sp3Comp->start();
    433442  }
     
    439448    signal(SIGINT, catch_signal);
    440449
    441     bncEphUploadCaster* casterEph = new bncEphUploadCaster(); (void) casterEph;
    442 
    443     bncCaster* caster = new bncCaster();
     450    casterEph = new bncEphUploadCaster(); (void) casterEph;
     451
     452    caster = new bncCaster();
    444453
    445454    BNC_CORE->setCaster(caster);
     
    470479      BNC_CORE->startPPP();
    471480
    472       bncRawFile*   rawFile   = new bncRawFile(rawFileName, "", bncRawFile::input);
    473       bncGetThread* getThread = new bncGetThread(rawFile);
     481      rawFile   = new bncRawFile(rawFileName, "", bncRawFile::input);
     482      getThread = new bncGetThread(rawFile);
    474483      caster->addGetThread(getThread, true);
    475484    }
     
    478487  // Start the application
    479488  // ---------------------
    480   return app.exec();
     489  app.exec();
     490  if (interactive) {
     491    delete bncWin;
     492  }
     493  if (caster) {
     494    delete caster;
     495  }
     496  if (casterEph) {
     497    delete casterEph;
     498  }
     499  if (rawFile) {
     500    delete rawFile;
     501  }
     502  return 0;
    481503}
Note: See TracChangeset for help on using the changeset viewer.