Changeset 5084 in ntrip
- Timestamp:
- Mar 31, 2013, 9:51:10 AM (12 years ago)
- Location:
- trunk/BNC/src
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/app.cpp
r5074 r5084 20 20 using namespace std; 21 21 22 // Global Variable23 ////////////////////////////////////////////////////////////////////////////24 t_bncCore* BNC_CORE = 0;25 26 22 // Constructor 27 23 //////////////////////////////////////////////////////////////////////////// 28 t_app::t_app(int& argc, char* argv[], bool GUIenabled) : 29 QApplication(argc, argv, GUIenabled) { 30 BNC_CORE = new t_bncCore(GUIenabled); 24 t_app::t_app(int& argc, char* argv[], bool GUIenabled) : QApplication(argc, argv, GUIenabled) { 31 25 } 32 26 -
trunk/BNC/src/bnccore.cpp
r5074 r5084 56 56 using namespace std; 57 57 58 // Singleton 59 //////////////////////////////////////////////////////////////////////////// 60 t_bncCore& bncCoreInstance() { 61 static t_bncCore _bncCore; 62 return _bncCore; 63 } 64 58 65 // Constructor 59 66 //////////////////////////////////////////////////////////////////////////// 60 t_bncCore::t_bncCore( bool GUIenabled) {61 _GUIenabled = GUIenabled;67 t_bncCore::t_bncCore() { 68 _GUIenabled = true; 62 69 _logFileFlag = 0; 63 70 _logFile = 0; -
trunk/BNC/src/bnccore.h
r5074 r5084 44 44 public: 45 45 enum e_mode {interactive, nonInteractive, batchPostProcessing}; 46 t_bncCore( bool GUIenabled);46 t_bncCore(); 47 47 virtual ~t_bncCore(); 48 48 e_mode mode() const {return _mode;} 49 void setMode(e_mode mode) {_mode = mode;} 49 void setGUIenabled(bool GUIenabled) {_GUIenabled = GUIenabled;} 50 void setMode(e_mode mode) {_mode = mode;} 50 51 void setPort(int port); 51 52 void setPortCorr(int port); … … 142 143 }; 143 144 144 extern t_bncCore* BNC_CORE; 145 t_bncCore& bncCoreInstance(); 146 147 #define BNC_CORE (&bncCoreInstance()) 145 148 146 149 #endif -
trunk/BNC/src/bncmain.cpp
r5072 r5084 122 122 app.setOrganizationName("BKG"); 123 123 app.setOrganizationDomain("www.bkg.bund.de"); 124 125 BNC_CORE->setGUIenabled(GUIenabled); 124 126 BNC_CORE->setConfFileName( confFileName ); 125 127 -
trunk/BNC/src/bncwindow.cpp
r5083 r5084 74 74 #ifdef GNSSCENTER_PLUGIN 75 75 Q_EXPORT_PLUGIN2(gnsscenter_bnc, t_bncFactory) 76 t_bncCore* BNC_CORE = 0;77 76 #endif 78 77 … … 80 79 //////////////////////////////////////////////////////////////////////////// 81 80 bncWindow::bncWindow() { 82 83 #ifdef GNSSCENTER_PLUGIN84 if (BNC_CORE != 0) {85 QMessageBox::critical(this, "Caution", "Only one BNC allowed");86 }87 BNC_CORE = new t_bncCore(true);88 BNC_CORE->setConfFileName("");89 #endif90 81 91 82 _caster = 0; … … 2045 2036 } 2046 2037 2047 #ifdef GNSSCENTER_PLUGIN2048 delete BNC_CORE;2049 BNC_CORE = 0;2050 #endif2051 2052 2038 QMainWindow::closeEvent(event); 2053 2039 }
Note:
See TracChangeset
for help on using the changeset viewer.