Changeset 10040 in ntrip for trunk/BNC/src/combination/bnccomb.h
- Timestamp:
- May 11, 2023, 2:23:16 PM (12 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/BNC/src/combination/bnccomb.h
r10039 r10040 22 22 Q_OBJECT 23 23 public: 24 bncComb(); 25 virtual ~bncComb(); 26 static bncComb* instance(); 24 static bncComb* getInstance() { 25 if (instance == 0) { 26 instance = new bncComb; 27 } 28 return instance; 29 } 30 bncComb(const bncComb&) = delete; 31 bncComb& operator=(const bncComb&) = delete; 32 static void destruct() { 33 delete instance; 34 instance = nullptr; 35 } 27 36 int nStreams() const {return _ACs.size();} 28 37 … … 33 42 void slotNewCodeBiases(QList<t_satCodeBias> satCodeBiases); 34 43 35 36 44 private slots: 37 45 void slotReadBiasSnxFile(); … … 44 52 45 53 private: 46 //bncComb(); // private constructor 47 bncComb(const bncComb&); 48 bncComb& operator=(const bncComb&); 49 54 bncComb(); // no public constructor 55 ~bncComb(); // no public destructor 56 static bncComb* instance; // declaration class variable 50 57 enum e_method{singleEpoch, filter}; 51 58 … … 267 274 }; 268 275 269 #define BNC_CMB (bncComb:: instance())276 #define BNC_CMB (bncComb::getInstance()) 270 277 271 278 #endif
Note:
See TracChangeset
for help on using the changeset viewer.